Consider the following set ofprocesses, with the length of the CPU-burst time given inmilliseconds:
Process | Burst Time | Priority | Arrival Time |
P1 | 10 | 3 | 0 |
P2 | 1 | 1 | 12 |
P3 | 2 | 4 | 0 |
P4 | 1 | 5 | 0 |
P5 | 5 | 2 | 0 |
In the above table, a smaller prioritynumber implies a higher priority. Suppose that these processes arescheduled by the priority policy with preemption.
- Draw the Gantt chart (i.e., time chart) illustrating theexecution of these processes.
- What is the waiting time of each individual process?
- What is the average waiting time for these processes?