I can do all things...
32.Common Concurrency Problems 32.Common Concurrency Problems
32. Common Concurrency Problems32.1 What Types Of Bugs Exist? 并发中有哪些类型的bug?大致分为两种:non-deadlock bugs和deadlock bugs。 32.
31.Semaphores 31.Semaphores
31. Semaphores 前面已经学习了使用lock和condition varivable来实现并发,这一节学习semaphore信号量。有了semaphore,就只有统一的原语操作了,可以用semaphore来实现lock和cond
30.Condition Variables 30.Condition Variables
30. Condition Variables 之前介绍了lock,以及使用lock构建的一些线程安全的数据结构。但是那并不是所有并发的内容,说到并发,怎么能不谈谈同步呢?并发中,一个线程等待另一个线程是很常见的事情。举个栗子,父线程要等待
29.Lock-based Concurrent Data Structures 29.Lock-based Concurrent Data Structures
29. Lock-based Concurrent Data Structures 有了lock之后,就可以用在一些数据结构中,使其变得thread safe线程安全。问题来了:给定一个数据结构时,如何加入lock使其能够正常工作?如何加入
28.Locks 28.Locks
28. Locks 并发中最基本的问题就是如何保证一段代码执行的原子性,这一章的lock就是用来解决这个问题的。 28.1 Locks: The Basic Idea 对于更新共享变量的这段代码,也就是critical section:
26.Concurrency:An Introduction 26.Concurrency:An Introduction
26. Concurrency: An Introduction 在前面很长的部分里我们讨论了虚拟化的问题,主要是对CPU和内存的虚拟化。在接下来的部分里,我们将学习一个进程(process)的抽象,那就是线程(thread)。一个进程可以