Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A single processor system has three resource ... Start Learning for Free
A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column 'alloc' denotes the number of units of each resource type allocated to each process, and the column 'request' denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?
  • a)
    P0
  • b)
    P1
  • c)
    P2
  • d)
    None of the above, since the system is in a deadlock state
Correct answer is option 'C'. Can you explain this answer?
Most Upvoted Answer
A single processor system has three resource types X, Y and Z, which a...
Initially,
Total = [X Y Z] = [5 5 5]
Total _Alloc = [X Y Z] = [5 4 3]
Available = Total – Total_Alloc = [5 5 5] – [5 4 3] = [0 1 2]
With the instances available currently, only the requirement of process P1 can be satisfied. So, process P1 is allocated the requested resources. It completes its execution and then frees up the instances of resources held by it.
Then, Available = [0 1 2] + [2 0 1] = [2 1 3]
With the instances available currently, only the requirement of process P0 can be satisfied. So, process P0 is allocated the requested resources. It completes its execution and then frees up the instances of resources held by it.
Then, Available = [2 1 3] + [1 2 1] = [3 3 4]
With the instances available currently, the requirement of process P2 can be satisfied. So, process P2 is allocated the requested resources. It completes its execution and then frees up the instances of resources held by it.
Then, Available = [3 3 4] + [2 2 1] = [5 5 5]
Thus, there exists a safe sequence P1, P0, P2, in which all the processes can be executed. So, the system is in a safe state.
Process P2 will be executed at last.
Free Test
Community Answer
A single processor system has three resource types X, Y and Z, which a...
Initially,
Total = [X Y Z] = [5 5 5]
Total _Alloc = [X Y Z] = [5 4 3]
Available = Total – Total_Alloc = [5 5 5] – [5 4 3] = [0 1 2]
With the instances available currently, only the requirement of process P1 can be satisfied. So, process P1 is allocated the requested resources. It completes its execution and then frees up the instances of resources held by it.
Then, Available = [0 1 2] + [2 0 1] = [2 1 3]
With the instances available currently, only the requirement of process P0 can be satisfied. So, process P0 is allocated the requested resources. It completes its execution and then frees up the instances of resources held by it.
Then, Available = [2 1 3] + [1 2 1] = [3 3 4]
With the instances available currently, the requirement of process P2 can be satisfied. So, process P2 is allocated the requested resources. It completes its execution and then frees up the instances of resources held by it.
Then, Available = [3 3 4] + [2 2 1] = [5 5 5]
Thus, there exists a safe sequence P1, P0, P2, in which all the processes can be executed. So, the system is in a safe state.
Process P2 will be executed at last.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer?
Question Description
A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer?.
Solutions for A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete the execution. Which of these processes will finish LAST?a)P0b)P1c)P2d)None of the above, since the system is in a deadlock stateCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev