There are 5 processes in a system. The maximum number of records a process can take is 2. At a time, a process can take only a single resource and can free only a single resource. How many records are required to ensure deadlock-free execution _________?
Solution :
The correct option is 6.
To determine the minimum number of resources (records) required to guarantee a deadlock-free execution in a system, we can apply the resource allocation principles for deadlock prevention.
Let:
- The number of processes be P.
- The maximum demand of resources for each process i be Ri.
- The total number of resources in the system be R.
Here, we are given:
- Number of processes,
- Maximum resource requirement for each process,
for all processes.
A deadlock occurs in the worst-case scenario when every process has acquired one less than its maximum requirement and is waiting for one more resource. In this state, all processes are blocked, and no progress can be made.
To find this worst-case allocation where deadlock is just about to occur, we allocate
resources to each process:
Substituting the values:
If we have exactly 5 resources, each of the 5 processes can hold 1 resource. Since each process needs 2 resources to finish, they will all wait indefinitely for another resource, resulting in a deadlock.
To ensure a deadlock-free execution, we must add at least 1 more resource to the system. This extra resource will allow at least one process to satisfy its maximum demand, complete its execution, and release all of its held resources back to the pool for other processes to use.
Thus, the minimum number of resources R required to guarantee deadlock-free execution is:
Therefore, a minimum of 6 records are required to ensure deadlock-free execution.
Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.
Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.
Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.
Prepare for GATE 2026 Civil Engineering with the latest question papers, previous year papers, detailed solutions, syllabus, exam pattern, preparation tips, mock tests, and subject-wise study material. Download GATE 2026 CE question papers with solutions in PDF format and boost your preparation for top engineering institutes and PSU recruitment.
Prepare effectively for GATE 2026 Electronics & Communication Engineering (EC) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Electronic Devices, Analog Circuits, Digital Circuits, Signals & Systems, Network Theory, Control Systems, Electromagnetics, Communications, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 EC preparation strategy.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.