October 2010
Intermediate to advanced
1552 pages
45h 39m
English
This chapter describes POSIX semaphores, which allow processes and threads to synchronize access to shared resources. In Chapter 47, we described System V semaphores, and we’ll assume that the reader is familiar with the general semaphore concepts and rationale for using semaphores that were presented at the start of that chapter. During the course of this chapter, we’ll make comparisons between POSIX semaphores and System V semaphores to clarify the ways in which these two semaphore APIs are the same and the ways in which they differ.
SUSv3 specifies two types of POSIX semaphores:
• Named semaphores: This type of semaphore has a name. By calling sem_open() with the same name, unrelated processes can access the ...
Read now
Unlock full access