Resources: page=82


The first thread into a section locks a semaphore (or queues) and the last one out unlocks it. By analogy with the pattern where the first person into a room turns on the light (locks the mutex) and the last one out turns it off (unlocks the mutex).