See UNISA – Summary of 2010 Posts for a list of related UNISA posts.
This is one of the final exam preparation posts and looks at some of the common scheduling algorithms and reviews the associated assignment from this year as an example. If you are not studying at UNISA, you should probably skip this post
What common scheduling algorithms are we going to review?
|First-Come, First-Served (FCFS)||The process that requests the CPU is serviced first.||No||
The process with the shortest “next CPU burst” time is scheduled first.
|Round-Robin (RR)||Processing is split up into time quantum’s or time slice, ranging from 10 to 100 milliseconds.||Yes||
Difficult to determine correct quantum
Each process has an associated priority and the highest priority processes are scheduled first.
Assignment 1 claims that the following the following processes hit us, the one and only processor in the machine:
- Burst time … the processing duration that is required by the process, for example milliseconds of processor time.
- Quantum … time quantum or duration that the processor will allocate to a process, resulting in process slicing if burst time > quantum.
- Priority … the smaller the value the higher the priority in this case.
Gant Charts … useful visualization
I added the following to help me keep track of the chaos:
- Arrival queue at the top which shows when processes arrive
- Wait queue at the bottom which shows the waiting process and remaining burst time (PROCESS.BURSTTIME) for the Round Robin. Let’s hope that the exam will not have one of these RR algorithms, because it is very easy to get the wait queue wrong.
The formulas we need to remember
- Turnaround time (TT) = Time completed – Arrival time
- Waiting Time (WT) = Turnaround time – Sum of burst time
The “Shortest-Job-First (SJF)” is the most effective algorithm for this set of process test data.