Quiz on Semaphores
It's quiz time! Answer the following questions to test your knowledge and understanding of semaphores.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
Consider the following code to initialize a semaphore:
sem_t s;
sem_init(&s, 0, 1); // L2
In L2, what does the 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
1 / 5