Question
Download Solution PDFSuppose a system has 12 magnetic tape drives and at time t0, three processes are allotted tape drives out of their as given below:
|
Maximum Needs |
Current Needs |
p0 |
10 |
5 |
p1 |
4 |
2 |
p2 |
9 |
2 |
At time t0, the system is in safe state. Which of the following is safe sequence so that deadlock is avoided?
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFData:
Remaining Need = Maximum need – Current need
|
Maximum Needs |
Current needs |
Remaining Needs |
p0 |
10 |
5 |
5 |
p1 |
4 |
2 |
2 |
p2 |
9 |
2 |
7 |
Total resources = 12
Total resources allocated = 5 + 2 + 2 = 9
Available resources = 12 – 9 = 3
Calculation:
Available resource ≥ remaining need of p1
Using 3 resources, p1 gets executed first. It frees 2 resources.
Available resources = 3 + 2 = 5
Available resource ≥ remaining need of p0
Using 5 resources, p0 gets executed first. It frees 5 resources.
Available resources = 5 + 5 = 10
Available resource ≥ remaining need of p2
Now, p2 can be executed easily. Hence, (p1, p0, p2) is a safe sequence.
Last updated on Jun 6, 2025
-> The UGC NET Exam Schedule 2025 for June has been released on its official website.
-> The UGC NET Application Correction Window 2025 is available from 14th May to 15th May 2025.
-> The UGC NET 2025 online application form submission closed on 12th May 2025.
-> The June 2025 Exam will be conducted from 21st June to 30th June 2025
-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.
-> The exam is conducted bi-annually - in June and December cycles.
-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions.
-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.