CS FundamentalsHardGATE CS
Three processes share one resource type with identical instances. P1 may need at most 3 instances, P2 at most 4 and P3 at most 5, and each requests instances one at a time. What is the minimum number of instances that guarantees deadlock can never occur?
- A. 9
- B. 5
- C. 10
- D. 15
Correct answer: C. 10
Worst case: each process holds one less than its maximum, 2 + 3 + 4 = 9 instances, and all wait. One more instance lets some process finish and release, so 10 suffices. 9 is exactly the deadlock state, 5 is the largest single maximum, and 15 adds a spare per process to the 12 maxima.
More Operating Systems questions
- Free holes (in order) are 150, 400, 220, 350 and 500 KB. Requests of 210, 380, 140 and 330 KB arrive in that order. Which placement…
- A buddy allocator manages 1024 KB starting at address 0 and always uses the lowest-addressed free block of the needed size. Requests: A =…
- Periodic tasks (execution time, period = deadline): T1 (1, 4), T2 (2, 6), T3 (3, 12), scheduled by rate-monotonic priorities. Which…
- A Unix-style inode has 10 direct pointers, 1 single-indirect and 1 double-indirect pointer. Blocks are 1 KB and block pointers 4 bytes…
- Same inode (10 direct, 1 single-indirect, 1 double-indirect; 1 KB blocks; 256 pointers per block). The inode is already in memory and…
- A 2 GB partition uses a FAT with 4 KB clusters and 4-byte FAT entries. How large is one copy of the FAT?