Work by hand (then check with lab OS4.1). Workload (times in ms; priority 1 = highest):
| Process | Arrival | Burst | Priority |
|---|---|---|---|
| A | 0 | 3 | 2 |
| B | 2 | 6 | 1 |
| C | 4 | 4 | 3 |
| D | 6 | 5 | 2 |
| E | 8 | 2 | 1 |
For FCFS, SJF (non-preemptive), SRTF, preemptive priority and RR (q = 2):
- Draw the Gantt chart (write the ready queue at each decision point).
- Compute each process's finish, turnaround, waiting and response time, and the averages.
- Count the context switches.
Then answer:
- Which algorithm is best for average waiting, which for average response, and why?
- The EdgeCampus login service is interactive, while the nightly report generator is batch. Which algorithm would you choose for each, and what would change if context switches cost 0.5 ms?