并发
文章平均质量分 83
crazywaster
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
并发编程基础 Lecture Notes(一)
多个单核CPU VS 单个多核CPU每个单核CPU都有独立的电路和cache支持。而多核CPU共享一套芯片组,一套存储,因此,多核之间的通信看起来就变得比多个单核CPU开销要小。但是,数据的共享性又给多核CPU带来了分时的开销。Concurrency:a collection of programs is said to be concurrent if at a given point原创 2016-09-03 19:34:26 · 384 阅读 · 0 评论 -
并发编程基础 Lecture Notes(三)
The flaws of busy waiting:- waste time reading locks- can't guarantee fairnessSemaphore: a special kind of shared variable that is manipulated only by two atomic operations P and V, the value of原创 2016-09-23 16:52:52 · 419 阅读 · 0 评论 -
并发编程基础 Lecture Notes(四)
Monitor是另一种处理临界资源的机制。信号量的缺点:- 共享的变量对于所有进程来说是全局的,所有没有合理的保护机制,很容易误操作- 并发代码散乱分布在整个程序中- 一遇到mutual exclusion就要进行编码管道的优点:- 固定的共享变量对进程隐藏- 通过管道procedure来访问管道- 一次只允许一个进程在管道内进行操作,因为自动形成了mutual e原创 2016-09-25 19:36:49 · 460 阅读 · 0 评论 -
并发编程基础 Lecture Notes(二)
Process && Thread && Program1. http://www.ruanyifeng.com/blog/2013/04/processes_and_threads.html2. process is the execution of a sequential program3. 进程独立享有内存地址空间,是资源分配的基础单位,而线程是CPU分配的基本单位。多原创 2016-09-19 15:23:41 · 504 阅读 · 0 评论
分享