Assigned: Apr 5, 2020
Due: Apr 19, 2020 23:59:59
Submit: Upload to Canvas as PDF
100 points total
Consider the following set of processes:
Process Name | Arrival Time | Processing Time |
---|---|---|
A | 0 | 3 |
B | 1 | 5 |
C | 3 | 2 |
D | 9 | 5 |
E | 12 | 5 |
Perform FCFS, RR \left(q=4\right), SPF, SRT, on them and get the Finish Time and Turnaround Time for each process. For reference:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FCFS | ||||||||||||||||||||
RR | ||||||||||||||||||||
SPF | ||||||||||||||||||||
SRT |
Consider a computer with two processes, H
, with high priority, and L
, with low priority. The scheduling rules are such that H
is run whenever it is in ready state. At a certain moment, with L
in its critical region, H
becomes ready to run (e.g., an I/O operation completes). H
now begins busy waiting, but since L
is never scheduled with H
is running, L
never gets the chance to leave its critical region, so H
loops forever. This situation is sometimes referred to as the priority inversion problem.
If instead of priority scheduling, we use round-robin scheduling, will we encounter the same problem? Please explain your answer in detail.
Based on measurements, we know for a certain system the average process runs for a time X before blocking on I/O. It takes a time Y to do a process switch, which is effectively wasted (overhead). For round-robin scheduling with quantum Q, give a formula for the CPU efficiency for each of the following:
NOTE: The CPU efficiency is the useful CPU time divided by the total CPU time.