Question: Consider three processes P 1 , P 2 , P 3 , and P 4 with the following CPU burst times 1 0 , 1

Consider three processes P1, P2, P3, and P4 with the following CPU burst times 10,14,11, and 7 respctively. The arrival times are 2,1,3,1 respectively. The priority is given by 4,13,2. Assume that overhead time for process switching and scheduling functions are negligible (assumed to be 0). There is a lock L:Process P1 acquires L in its first burst unit of time, and releases L in its last burst unit of time.Process P4 acquires L in its first unit of burst time, and releases 4 burst time units after. Then, it acquires L again after executing 2 burst time units. Process P3 acquires L every 2 burst time units, and releases 2 burst time units after. Immediately, it grabs the lock again when it is scheduled on CPU. It keeps repeating the same pattern.Processes busy wait when trying to acquire a lock by spinlock. The waiting time does not constitute to burst time.Please note:The priority scheduler is preemptive.All processes arriving at the same time step arrive in the order of PID.The quanta for RR is 1 unit of time and newly arrived processes are scheduled lastfor RR. When the RR quantum expires, the currently running process is added atthe end of to the ready list before any newly arriving processes.Scheduling breaks ties via priority in Shortest Remaining Time First (SRTF). If still tie, then lowest PID goes first. Lock breaks ties via PID. P1 gets the lock before P2 if they need the lock at the same time.If a process arrives at time x, they are ready to run at the beginning of time x.Total turnaround time is the time a process takes to complete after it arrives.Compute the average turn around time.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!