מערכות הפעלה מערכות הפעלה

לחץ כאן לכל השאלות

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes: Process Execution time Arrival time P1 20 0 P2 25 15 P3 10 30 P4 15 45 What is the total waiting time for process P2?

1
done
At time 0, P1 is the only process, P1 runs for 15 time units. At time 15, P2 arrives, but P1 has the shortest remaining time. So P1 continues for 5 more time units. At time 20, P2 is the only process. So it runs for 10 time units At time 30, P3 is the shortest remaining time process. So it runs for 10 time units At time 40, P2 runs as it is the only process. P2 runs for 5 time units. At time 45, P3 arrives, but P2 has the shortest remaining time. So P2 continues for 10 more time units. P2 completes its ececution at time 55 Total waiting time for P2 = Complition time - (Arrival time + Execution time) = 55 - (15 + 25) = 15
by
מיין לפי

* השאלה נוספה בתאריך: 20-07-2020