CS FundamentalsVery hardCapgemini · Cognizant GenC
Deadlock detection with 3 resource types, Available = (0, 0, 0). Allocation: P0 (0,1,0), P1 (2,0,0), P2 (3,0,3), P3 (2,1,1), P4 (0,0,2). Current Request: P0 (0,0,0), P1 (2,0,2), P2 (0,0,1), P3 (1,0,0), P4 (0,0,2). Which processes are deadlocked?
- A. No process is deadlocked
- B. P1 and P2 only
- C. P0, P2 and P4
- D. P1, P2, P3 and P4
Correct answer: D. P1, P2, P3 and P4
P0 has a zero request and finishes, releasing (0,1,0), giving Work = (0,1,0). No other request fits within (0,1,0): P1 needs (2,0,2), P2 (0,0,1), P3 (1,0,0), P4 (0,0,2). So P1 to P4 are deadlocked.
More Operating Systems questions
- A RAID 5 array has 6 disks of 4 TB each. What are its usable capacity and the number of disk I/Os needed to perform one small random write…
- The page reference string is 1, 2, 1, 3, 4, 1, 2, 5, 2, 1. Using a working-set window of the last 5 references, what is the size of the…
- Round Robin with quantum 3 ms is used for P1 (arrival 0, burst 5), P2 (1, 3), P3 (2, 8), P4 (3, 2) and P5 (4, 4). A process arriving…
- Memory access takes 200 ns and servicing a page fault takes 8 ms. For the effective access time to degrade by no more than 10% over the…
- A segment table holds (base, limit): segment 0 = (1200, 700), segment 1 = (4000, 300), segment 2 = (3000, 500). Which logical address…
- A disk has an average seek time of 8 ms, rotates at 7,200 RPM and transfers data at 100 MB/s. Using the average rotational latency (half a…