题目内容

A binary semaphore is a semaphore with integer values ____________

A. 1
B. -1
C. 0.8
D. 0.5

查看答案
更多问题

The following pair of processes share a common variable X.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?

A. two
B. three
C. four
D. eight

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

答案查题题库