Question: Manage mult - unit resources a ) Extend the request and release functions to work with resources having multiple identical units. p . other _
Manage multunit resources
a Extend the request and release functions to work with resources having multiple identical units.
potherresources is a list of pairs r k where r is a resource and k is the number of units that p is holding.
rstate is a counter that keeps track of the currently available units of r
rwaitinglist contains pairs p k where p is the waiting process and k is the number of requested units.
The request functions has the form requestr k where r is the resource and k is the number of units. To simplify the algorithm, a process may request units of the same resource only once.
The release functions has the form releaser where r is the resource. All k units of r are released at the same time.
Note that a release of k units may enable more than one process from rwaitinglist.
b A process could remain stuck in rwaitinglist forever if the number of units requested exceeds the total number of units available initially in r How could that problem be prevented?
c Problem Nine: A process p could starve by being skipped over by processes arriving after p but requesting smaller numbers of units than p How could that problem be prevented?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
