

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Information on 2-phase commit, deadlock, and resource allocation. It includes instructions for implementing get read lock and get write lock code, identifying potential deadlock scenarios, and writing resource allocation/release routines for dijkstra's conditions. It also includes exercises on wait-for graphs and banker's algorithm.
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!
(a) Each process runs at a different (fixed) priority. If a higher priority process would block on a resource held by a lower priority process, it kills the low priority process. (b) Resources are numbered by integers. All odd numbered resources are requested before any even even ones. (c) Resources are requested in any order, but it is possible to time-share the resource by 1) saving the state associated with one processes use of the resource and 2) restoring the state associated with another process. (d) Resources are numbered 0 through 5. A process requests either resource 0 or 5, then 3 or 4, and then may request 1 and then may request 2. (e) If all the resources requested are available they are allocaated otherwise the re- questing process releases all the resources it holds.
Variable R 0 R 1 R 2 total resources 3 4 2 allocated/need p 0 0/3 2/2 1/ allocated/need p 1 1/2 1/0 0/ allocated/need p 2 0/1 1/2 0/
Variable R 0 R 1 R 2 total resources 3 2 1 allocated to p 0 1 0 1 allocated to p 1 1 1 0 allocated to p 2 0 1 0
Assuming that p 1 is waiting for 1 unit of R 2 and p 2 is waiting for 2 units of R 0.