CS FundamentalsHardGATE CS
How many of these statements about deadlock are correct? 1. A safe state guarantees that no deadlock will occur if processes follow their declared maxima. 2. An unsafe state means the system is necessarily deadlocked. 3. The wait-for graph is obtained from the resource-allocation graph by collapsing resource nodes, and is used for single-instance detection. 4. Ostrich (ignoring deadlock) is used by most general-purpose OSes for many resources.
- A. 3
- B. 2
- C. 4
- D. 1
Correct answer: A. 3
1, 3 and 4 are correct. 2 is false: an unsafe state only means deadlock is POSSIBLE; with lucky request patterns the processes may still finish.
More Operating Systems questions
- 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…
- Which property does Peterson's algorithm guarantee for two processes, assuming loads and stores are atomic and NOT reordered?