- A computer system is mainly used for non-interactive work where jobs (processes) arrive randomly, persist until completed and then leave the system. There may be many processes that need scheduling concurrently. Describe two process scheduling algorithms that would be suitable for this system and explain why they are appropriate.
- A different system deals mainly with multiple, concurrent, interactive processes. Give two process scheduling algorithms for this situation and explain why they are appropriate.
- A new system is to be developed that will run a mix of the two types of processes. Are any of the previous scheduling algorithms appropriate? Describe one new algorithm that could be used.
[10 marks]
- For non-interactive works, there is no need for quick response time and also the turn around time for process is important(jobs persist until completed). Meanwhile, the processes arrive randomly. Thus, FCFS and SJF are suitable for this system.
- For interactive works, the response time for a process matters. And round robin improve response time compared two scheduling algorithm in question 1. Thus, considering the interative works, round robin and priority queue are two suitable for this system.
- This system may require less turn around time and less response time for both types of processes. Using SJF could get optimal turn around time. However, SJF is a non-preemptive algorithm, which is harmful for interactive processes. We can design a good algorithm that select shortest job to run and using round robin time slice for each process.
The following example will show how this works:
Process | Burst time | type |
---|---|---|
P1 | 24 | Interactive |
P2 | 3 | non-interactive |
P3 | 3 | non-interactive |
P2 and P3 have the same burst time that is shortest time. Assume P2 starts firstly, and then after time slice = 1, P3 exectues. Then P3. P1.
Thus, P2->P3->P1->P2->P3->P1->P2->P3->P1.
This help improve the response time for P1(interactive), and also reduce the turn around time for P2 and P3 if they are non-interactive