September 2008
Intermediate to advanced
280 pages
6h 31m
English
Threaded programming has become quite popular. For Unix, the most widespread threads package is the POSIX standard Pthreads, so we will use it for our example in this section. The principles are similar for other thread packages.
Modern operating systems use timesharing to manage multiple running programs in such a way that they appear to the user to execute simultaneously. Of course, if the machine has more than one CPU, more than one program actually can run simultaneously, but for simplicity we will assume just one processor, in which case the simultaneity is only apparent.
Each instance of a running program is represented by the OS as a process (in Unix terminology) or ...
Read now
Unlock full access