Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Understanding Operating Systems (7th edition) Ann Mciver Mchoes and Ida M. Flynn

ID: 3796669 • Letter: U

Question

Understanding Operating Systems (7th edition) Ann Mciver Mchoes and Ida M. Flynn Page 169.

Question 14.

For the system described in Questions 13-16 (focus on 14) given that all of the devices are of the same type, and using the definitions presented in the discussion of the Banker's Algorithm, answer these questions:

a) Calculate the number of available devices

b) Determine the remaining needs for each job in each system

c) Determine whether each system is safe or unsafe

d) If the system is in a safe state, list the sequence of requests and releases that will make it possible for all processes to run to completion

e) If the system is in an unsafe state, how it's possible for deadlock to occur

Question 14: This system has 12 devices


Job number Devices Allocated Max Required Remaining needed Job 1 5 8 Job 2 1 4 Job 3 5 7

Explanation / Answer

a) Total devices = 12 Devices allocated = 5+1+5 = 11 Available devices = 12 – 11 = 1

b) Remaining = 5-8,1-4,5-7

c) unsafe

d) Assign the remaining system device to job #1. After it runs to completion, and all that job's resources are returned to the available list, the system will then have at least 6 free resources.

Run job #3 and job #4 next. After job #3 completes, job #2 can be run to completion.

Run job #2 and job #4 next. After job #2 completes, job #3 can be run to completion.

e) The system is not initially in an unsafe state.

It is possible to place the system into an unsafe state by initially assigning the remaining device to job #2, #3, or #4. If all jobs then request one or more additional resources (each job within its maximum limit) without giving up any current resources, the system is deadlocked.