摘要: "Information on the C++11 Memory Model @scottmeyers " http://www.cnblogs.com/scotth/p/4951385.html "漫谈C++11多线程内存模型 " 写在前面 “C++11 feels ... 阅读全文
posted @ 2015-11-09 23:24 scott_h 阅读(743) 评论(0) 推荐(0) 编辑
摘要: Cross platform asynchronous I/O 背景: 特别说明的是libev 中包含了libevent 的内容,而libuv从libev修改而来。 node.js 最初发起于 2009 年, 是一个可以让 Javascript 代码脱离浏览器的执行环境, libuv 使用了 ... 阅读全文
posted @ 2015-11-09 22:19 scott_h 阅读(7445) 评论(0) 推荐(0) 编辑
摘要: 今天实现了一个 "C 用的 coroutine 库" . 我相信这个东西已经被无数 C 程序员实现过了, 但是通过 google 找了许多, 或是接口不让我满意, 或是过于重量. 在 Windows 下, 我们可以通过 fiber 来实现 coroutine , 在 posix 下, 有更简单的... 阅读全文
posted @ 2015-11-09 21:13 scott_h 阅读(524) 评论(0) 推荐(0) 编辑
摘要: "Cplusplus Concurrency In Practice 什么是并发" "剖析为什么在多核多线程程序中要慎用volatile关键字?" "浅析C++多线程内存模型" "漫谈C++11多线程内存模型 " "... 阅读全文
posted @ 2015-11-09 20:53 scott_h 阅读(311) 评论(0) 推荐(0) 编辑
摘要: "使用Go连接MySQL" 阅读全文
posted @ 2015-11-09 14:54 scott_h 阅读(145) 评论(0) 推荐(0) 编辑
摘要: OS: windows "Process and Thread Functions" "windows同步方式 传送门" PS. include Fiber "thread_functions" "CreateThread" https://technet.microsoft.com/zh cn/i 阅读全文
posted @ 2015-11-09 14:40 scott_h 阅读(450) 评论(0) 推荐(0) 编辑
摘要: "Linux 下多核CPU知识" 1. 在Linux下,如何确认是多核或多CPU: 如果有多个类似以下的项目,则为多核或多CPU: processor : 0 ...... processor : 1 2. Linux下,如何看每个CPU的使用率: 之后按下1. 则显示多个CPU 3. 如何察看某个 阅读全文
posted @ 2015-11-09 14:37 scott_h 阅读(12516) 评论(0) 推荐(0) 编辑
摘要: 设置Processor Affinity 作用: 1.进程和线程的亲缘性(affinity),使进程或线程在指定的CPU(核)上运行.(比如程序A,在第4个核心上运行) 2.设置进程 或者 线程, 使用CPU的数量(比如程序A,在第1,2,3个(共3个核心)核心上运行) 3.CPU负载均衡 ... 阅读全文
posted @ 2015-11-09 14:27 scott_h 阅读(1507) 评论(0) 推荐(0) 编辑