Q29
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
More than one option can be correct.
Show answer without attempting
Answer: A, C
GATE CS · Deadlocks · 14 questions
14 Deadlock Conditions and Handling questions from GATE CS papers, each with the official answer key. Part of Deadlocks. Answer any question right here and it is marked straight away, or practise them one at a time.
Answer: A, C
Answer: 6
Answer: C, D
Answer: A, D
function OWNRESOURCE(Resource R)
Acquire lock L // a global lock
if R is available then
Acquire R
Release lock L
else
if R is owned by another process P then
Terminate P, after releasing all resources owned by P
Acquire R
Restart P
Release lock L
end if
end if
end functionAnswer: A, B, C
Answer: A
Answer: 2
| 1 | 0 | 1 | |
| 1 | 1 | 2 | |
| 1 | 0 | 3 | |
| 2 | 0 | 0 |
| 4 | 3 | 1 | |
| 2 | 1 | 4 | |
| 1 | 3 | 3 | |
| 5 | 4 | 1 |
Answer: A
| Process | Current Allocation | Maximum Requirement |
|---|---|---|
| P1 | 3 | 7 |
| P2 | 1 | 6 |
| P3 | 3 | 5 |
Answer: B
Answer: D
Answer: D
Answer: 7
| Allocation X | Allocation Y | Allocation Z | Max X | Max Y | Max Z | |
|---|---|---|---|---|---|---|
| P0 | 0 | 0 | 1 | 8 | 4 | 3 |
| P1 | 3 | 2 | 0 | 6 | 2 | 0 |
| P2 | 2 | 1 | 1 | 3 | 3 | 3 |
Answer: B
Answer: B
0/140 correct0 marks