Semaphores 2 — Test 1
Page 1 of 1
Question 1
What will happen if a non-recursive mutex is locked more than once?
0
System Administrator 2026
Question 2
What is a semaphore?
0
System Administrator 2026
Question 3
What are the two kinds of semaphores?
0
System Administrator 2026
Question 4
What is a mutex?
0
System Administrator 2026
Question 5
At a particular time of computation the value of a counting semaphore is 7.Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the semaphore is? (GATE 1987)
0
System Administrator 2026
Question 6
A binary semaphore is a semaphore with integer values ____________
0
System Administrator 2026
Question 7
The following pair of processes share a common variable X. Process A int Y; A1: Y = X*2; A2: X = Y; Process B int Z; B1: Z = X+1; B2: X = Z; X is set to 5 before either process begins execution. As usual, statements within a process are executed sequentially, but statements in process A may execute in any order with respect to statements in process B. How many different values of X are possible after both processes finish executing?
0
System Administrator 2026
Question 8
The program follows to use a shared binary semaphore T. Process A int Y; A1: Y = X*2; A2: X = Y; signal(T); Process B int Z; B1: wait(T); B2: Z = X+1; X = Z; T is set to 0 before either process begins execution and, as before, X is set to 5. Now, how many different values of X are possible after both processes finish executing?
0
System Administrator 2026
Question 9
Semaphores are mostly used to implement ____________
0
System Administrator 2026
Question 10
Spinlocks are intended to provide __________ only.
0
System Administrator 2026