February 2015
Intermediate to advanced
686 pages
18h 52m
English
Tasks can share resources in various ways. Multiple threads within the same process can share global variables, through which data can flow back and forth among them. File or memory region objects can be shared via memory mapping by multiple processes. The integrity of an exclusive resource can be endangered when multiple tasks gain access to it at the same time. Semaphore, mutex, and condition variable are POSIX objects that are normally used to protect the integrity of shared resources. For each type of these POSIX objects, we explain the corresponding POSIX functions, examine their usage patterns, and give a few running examples.
Keyword
Shared variables
Shared memory object
Semaphore
Mutex
Condition ...
Read now
Unlock full access