concurrency - Counting semaphores initialized to n -
if counting semaphore initialized n, mean n processes can run critical sections concurrently?
essentially, yes.
remember counting semaphore block when count negative after decrementing. therefore, semaphore can decremented n times before blocking. since decrements must matched increment, then, assuming each process decrements semaphore 1 time (which is, far, mutual case), yes, n processes able run critical sections @ same time.
concurrency synchronization operating-system semaphore locks
No comments:
Post a Comment