Back to the 2023 paper

Module 4: Deadlocks

20232m

A computer system has 6 tape drives, with n processes competing for them. Each process may need 2 tape drives. The maximum value of n for which the system is guaranteed to be deadlock free is
(i) 6
(ii) 5
(iii) 4
(iv) 3

Worked SolutionAI Assisted

Answer: (ii) 5

Formula for deadlock-free guarantee with single instance type needing up to k=2 per process: n*(k-1)+1 ≤ total => n*1+1 ≤6 => n≤5. So max 5 processes; 6th would allow deadlock if each holds 1 and waits for 1. (Some texts give 4 with stricter Max-need=2 → worst-case hold 1, need 1 extra, need n+1 ≤6 → n=5 same). Detailed: if each needs 2, safe sequence needs at least 1 process to complete to release.

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.