Operating System
Q181.
Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is N. Three semaphores empty, full and mutex are defined with respective initial values of 0, N and 1. Semaphore empty denotes the number of available slots in the buffer, for the consumer to read from. Semaphore full denotes the number of available slots in the buffer, for the producer to write to. The placeholder variables, denoted by P, Q, R, and S, in the code below can be assigned either empty or full. The valid semaphore operations are: wait() and signal(). Which one of the following assignments to P, Q, R and S will yield the correct solution?Q182.
Which of the following need not necessarily be saved on a context switch between processes?Q183.
Choose the correct alternatives (more than one may be correct) and write the corresponding letters only: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 :Q184.
Consider the following two-process synchronization solution. The shared variable turn is initialized to zero.Which one of the following is TRUE?Q186.
There are three processes in the ready queue. When the currently running process requests for I/O how many process switches take place?Q188.
In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements: I. If a process makes a transition D, it would result in another process making transition A immediately. II. A process P2 in blocked state can make transition E while another process P1 is in running state. III. The OS uses preemptive scheduling. IV. The OS uses non-preemptive scheduling. Which of the above statements are TRUE?Q190.
Consider the following proposed solution for the critical section problem. There are n processes: P_{0}...P_{n-1} . In the code,function pmax returns an integer not smaller than any of its arguments. For all i, t[i] is initialized to zero. Which one of the following is TRUE about the above solution?