作業系統›Ch5 Deadlock(死結)第 5 題/共 11 題
5. Banker's Algorithm、Deadlock、Safe State
#OS-05-005中Banker's AlgorithmDeadlockSafe State
Consider a system with the following resource allocation state. There are five processes P1~P5 and three resource types. The resource allocation tuple (x, y, z) means x instances of resource type 1, y instances of resource type 2, and z instances of resource type 3.
| Process | Max Demand | Allocated | Available |
|---|---|---|---|
| P1 | (7, 5, 3) | (0, 1, 0) | (3, 3, 2) |
| P2 | (3, 2, 2) | (2, 0, 0) | |
| P3 | (9, 0, 2) | (3, 0, 2) | |
| P4 | (2, 2, 2) | (2, 1, 1) | |
| P5 | (4, 3, 3) | (0, 0, 2) |
Given the current system state, which of the following is/are true when checking the safety of granting Process P2 a request of (1, 0, 1) according to the Banker's Algorithm?
📄 交大114
▤完整推導請見《WH 資工筆記 · 作業系統》Ch5 Deadlock(死結)