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 answer is 6.
To determine the minimum number of resources (records) required to guarantee a deadlock-free execution, we can apply the resource allocation principle for deadlock prevention.
Let:
- be the number of processes in the system. Here, .
- be the maximum number of resources required by process . Here, each process requires a maximum of 2 resources, so for all .
To find the worst-case allocation where a deadlock can potentially occur, we consider the state where every process is allocated one resource less than its maximum requirement. In this state, no process can complete, and all processes are waiting for their remaining resource.
The maximum number of resources that can be allocated without satisfying any process's complete request is:
Substituting the given values:
If the system has only 5 resources, it is possible for each of the 5 processes to hold 1 resource and wait indefinitely for a second resource, resulting in a deadlock.
To guarantee that a deadlock will never occur, we must add at least 1 more resource to the system. This additional resource ensures that at least one process can acquire its maximum required resources, run to completion, and subsequently release all its held resources back to the pool for other processes to use.
Therefore, the minimum number of resources (records) required for deadlock-free execution is:
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.
SSC CHSL Tier-1 Shift 1 2 July 2024 question paper with answers and detailed solutions. This practice paper covers questions from General Intelligence & Reasoning, General Awareness, Quantitative Aptitude, and English Language as asked in the SSC CHSL Tier-1 examination. Practice the SSC CHSL 2 July 2024 Shift 1 paper to understand the exam pattern, question types, difficulty level, and important topics for upcoming SSC CHSL exams.
SSC CHSL Tier-1 Shift 2 held on 2 July 2024 question paper with answers and detailed solutions. This previous year paper covers General Intelligence & Reasoning, Quantitative Aptitude, General Awareness, and English Language. The SSC CHSL Tier-1 exam was conducted in CBT mode with 100 questions for 200 marks and a 60-minute duration.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.