Question Details

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 _________?

Options

A

6

B

8

C

2

D

5

Show Answer
Correct Answer
A 6

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, P = 5
- Maximum resource requirement for each process, R i = 2 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 R i - 1 resources to each process:
Max resources allocated without completing any process = ∑ i = 1 P ( R i - 1 )

Substituting the values:
Sum = 5 × ( 2 - 1 ) = 5 × 1 = 5

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:
R ≥ ∑ i = 1 P ( R i - 1 ) + 1
R ≥ 5 + 1 = 6

Therefore, a minimum of 6 records are required to ensure deadlock-free execution.

Transparent Access on Mindyard

Built for Learners & Educators Alike

Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.

FREE FOR STUDENTS

Practice & Learn Free for Students

Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.

  • Unlimited mock tests & question bank practice
  • Full access to curated study library & formula notes
  • 100% free for students • No credit card required
2 MONTHS FREE TRIAL

Educators & Coaching Institutes

Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.

  • AI question uploader & rapid test generator
  • Anti-cheating tab proctoring & performance reports
  • Full Pro access free for 60 days • No upfront commitment
Discover more resources

You may also like

Mock Tests

View All
  • GATE
  • beginner
  • 3 hours
  • civil engineering

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.

  • GATE
  • beginner
  • 3 hours
  • electronics and communication engineering

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.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...
Ask your own doubt or choose a quick prompt: