← All topics
Quiz: Banker's Algorithm in Practice: questions with answers
15 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. In the safety algorithm, what is added to Work when a process can finish?
- Q2. A process asks for more than its Need. What does the resource-request algorithm do?
- Q3. Request ≤ Available, but after the pretend allocation no safe sequence exists. What happens?
- Q4. In the example, why could P3's request (1, 0, 1) be granted?
- Q5. At the end of a successful safety check, Work should equal:
- Q6. Which matrix does deadlock DETECTION use in place of Need?
- Q7. 3 processes each need at most 4 instances of a resource. What is the minimum number of instances that guarantees no deadlock?
- Q8. A system has 6 tape drives and each process needs 2. What is the largest number of processes that can never deadlock?
- Q9. What does this print? (code)
- Q10. Why is the Banker's algorithm rarely used in general-purpose operating systems?
- Q11. A system has (10, 5, 7) instances in total, and the processes hold (7, 2, 5) between them. What is Available?
- Q12. P2 asks for (1, 0, 0). It is within its Need, but Available is (0, 1, 1). What does the resource-request algorithm do?
- Q13. 4 processes each need at most 3 instances of a resource. What is the minimum number of instances that guarantees no deadlock?
- Q14. What does this print? (code)
- Q15. In the detection example, after P2 requests one more C, which process can still finish?