The program follows to use a shared binary semaphore T.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?
A. one
B. two
C. three
D. four
查看答案
All processes share a semaphore variablemutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward.Suppose a process executes in the following manner.
A. a deadlock will occur
B. processes will starve to enter critical section
C. several processes maybe executing in their critical section
D. all of the mentioned
Semaphores are mostly used to implement ____________
A. System calls
B. IPC mechanisms
C. System protection
D. None of the mentioned
The bounded buffer problem is also known as ____________
A. Readers – Writers problem
B. Dining – Philosophers problem
C. Producer – Consumer problem
D. None of the mentioned
In the bounded buffer problem, there are the empty and full semaphores that ____________
A. count the number of empty and full buffers
B. count the number of empty and full memory spaces
C. count the number of empty and full queues
D. none of the mentioned