2.1 Why Threads?
2.2 Programming with Threads
2.2.1 Thread Creation and Termination
18.104.22.168 Creating POSIX Threads
22.214.171.124 Creating Win-32 Threads
126.96.36.199 Handling Multiple Arguments
188.8.131.52 Thread Termination
184.108.40.206 Attributes and Stack Size
2.2.2 Threads and C++
220.127.116.11 Mutual Exclusion
18.104.22.168 Beyond Mutual Exclusion
2.2.4 Thread Safety
22.214.171.124 Unix Signals
126.96.36.199 POSIX Cancellation
In computer systems many things must go on at the same time; that is, they must be concurrent. Even in systems with just one processor, execution is generally multiplexed, providing at least the illusion that many things are happening at once. At any particular moment there may be a number of running programs, a disk drive that has completed an operation and requires service, packets that have just arrived from the network and also require service, characters that have been typed at the keyboard, etc. The operating system must divide processor time among the programs and arrange so that they all make progress in their execution. And while all this is going on, it must also handle all the other input/output activities and other events requiring attention as well.
This chapter covers multithreaded programming. The discussion here not only goes through the basics of using concurrency in user-level programs, but also introduces a number of concepts that are important in the operating system. ...