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

A system has five processes: P1, P2, P3, P4, and P5. There are four resource typ

ID: 3831288 • Letter: A

Question

A system has five processes: P1, P2, P3, P4, and P5. There are four resource types in the system: R1, R2, R3, and R4. The total numbers of resource units of each resource type are 5 units of R1, 6 units of R2, 8 units of R3, and 4 units of R4. The following table shows the maximum claim, the resources allocated to the process, and the current resource needs of the process. Is this system safe? If yes, what is the sequence to run these five processes? If your answer is YES, show the sequence to let these five processes run to completion: ___ If your answer is NO, explain why: ___ Three jobs are in the queue. The number of tickets each has and the number of seconds of processing time each requires are shown in Table 2. Assume that quanta of CPU time are sufficiently small, and that no other processes get any tickets before the last of these processes complete Fill the following blanks. Using lottery scheduling algorithm. turnaround time for Job 1 is: ___ turnaround time for Job 2 is: ___ turnaround time for Job 3 is: ___ average turnaround time is: ___

Explanation / Answer

For question 1:

The processes are in safe state:

The sequence would be

Allocated: (5, 6, 6, 2) << Initial state we need to calculate by summing all allocations

Available: (0, 0, 2, 2) << We get this by subtracting total allocation from total available resources available

Serve (P3)

Allocated: (4, 5, 5, 2) //After servicing P3 we release the resources that were allocated to it, therefore we sunstract them

Available: (1, 1, 3, 2) // We get this by subtracting total allocation (presently) from total available resources available

Serve (P1)

Allocated: (2, 4, 4, 2)

Available: (3, 2, 4, 2)

Serve (P2)

Allocated: (2, 3, 3, 2)

Available: (3, 3, 5, 2)

Serve (P4)

Allocated: (1, 2, 1, 1)

Available: (4, 4, 7, 3)

Serve (P5)

Allocated: (0, 0, 0, 0)

Available: (5, 6, 8, 4)

*All served

I have answered the question with respect to the guidelines provided. I have also commented few techniques used to solve the problem I hope you like the answer provided. If incase you face any problem, please feel free to comment

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote