Quiz on Semaphores
It's quiz time! Answer the following questions to test your knowledge and understanding of semaphores.
1
Consider following code to intialize a semaphore:
sem_t s;
sem_init(&s, 0, 1); //L2
In L2
what does value 1
represent?
A)
State of the lock
B)
The initial value of the semaphore
C)
Max value of the semaphore
D)
Represents whether s
is shared between different threads
Question 1 of 50 attempted
Get hands-on with 1400+ tech skills courses.