CS FundamentalsModerateGATE CS
Which deadlock-handling idea attacks the CIRCULAR WAIT condition?
- A. Require each process to request all its resources at once before starting
- B. Allow the OS to take a resource away from a waiting process
- C. Make resources sharable wherever possible
- D. Number all resource types and require every process to request them in increasing order
Correct answer: D. Number all resource types and require every process to request them in increasing order
A global ordering makes a cycle of waits impossible. Requesting everything at once attacks hold-and-wait, preemption attacks no-preemption, and sharing attacks mutual exclusion.
More Operating Systems questions
- How many of these statements about deadlock are correct? 1. A safe state guarantees that no deadlock will occur if processes follow their…
- Wound-wait and wait-die are timestamp-based deadlock-prevention schemes. Older transactions have smaller timestamps. In WAIT-DIE, what…
- Semaphores S = 1, T = 0, U = 0. X: wait(S); print('A'); signal(T). Y: wait(T); print('B'); signal(U). Z: wait(U); print('C'); signal(S)…
- Semaphores x = 0 and y = 0. P1: print('A'); signal(x); wait(y); print('B'). P2: print('C'); signal(y); wait(x); print('D'). Which of the…
- Shared int x = 0. Two threads each execute x = x + 1; TWICE, without synchronisation; each statement is a load into a private register, an…
- Shared int x = 1. Thread T1 executes x = x 2; and T2 executes x = x + 3; concurrently with no locking (each is load, compute, store). How…