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 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
1 / 5