Wednesday 21 October 2020

Operating System Semaphore MCQ Questions

 


1. An un-interruptible unit is known as ____________

a) single

b) atomic

c) static

d) none of the mentioned


2. Semaphore is a/an _______ to solve the critical section problem.

a) hardware for a system

b) special program for a system

c) integer variable

d) none of the mentioned



3. If the semaphore value is negative ____________

a) its magnitude is the number of processes waiting on that semaphore

b) it is invalid

c) no operation can be further performed on it until the signal operation is performed on it

d) none of the mentioned



4. The code that changes the value of the semaphore is ____________

a) remainder section code

b) non – critical section code

c) critical section code

d) none of the mentioned


5. The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0 = 1, S1 = 0, S2 = 0.



How many times will process P0 print ‘0’?

(A) At least twice

(B) Exactly twice

(C) Exactly thrice

(D) Exactly once






No comments:

Post a Comment