CS FundamentalsModerateGATE CS
Two resource types X, Y. Available = (1,1). Allocation: P0 (1,0), P1 (0,1), P2 (1,1). Max: P0 (2,1), P1 (1,2), P2 (2,2). How many of the 3! = 6 orders of P0, P1, P2 are safe sequences?
- A. 2
- B. 6
- C. 1
- D. 0
Correct answer: B. 6
Need: P0 (1,1), P1 (1,1), P2 (1,1). Each fits the initial Available (1,1), and after any one finishes Available only grows, so every order works: 6 of 6.
More Operating Systems questions
- A system has R identical instances of a resource shared by 4 processes needing at most 3, 4, 5 and 2 instances respectively. What is the…
- n processes share 12 identical units of a resource, and each process may need up to 4 units. What is the largest n for which deadlock is…
- k processes each need at most 3 instances of a resource that has 7 instances in total. Requests are made one instance at a time. What is…
- Deadlock detection (multi-instance). 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…
- In a resource-allocation graph where EVERY resource type has exactly one instance, which statement is correct?
- Which deadlock-handling idea attacks the CIRCULAR WAIT condition?