View worked solution
Answer: 7
To find the minimum number of tape units required to guarantee that a deadlock never occurs, we analyze the worst-case allocation scenario where a deadlock can exist.
Let:
- (number of programs/processes)
- (maximum tape units required by each program)
Worst-case Deadlock Scenario:
A deadlock occurs when each of the programs is allocated exactly one unit less than its maximum requirement, and no more free resources are available to satisfy any program's request.
In this state, each program holds:
The total number of tape units allocated in this deadlocked state is:
Preventing Deadlock:
If we have even one additional tape unit, at least one program will be able to acquire its required units, complete its execution, and release all its allocated resources back to the system.
Therefore, the minimum number of tape units required to ensure deadlock-free operation is:
Thus, the system must have at least 7 tape units to guarantee that deadlocks never arise.
Free practice · Your answers on this page are not saved.
