Red bar - interrupt, darker colour indicates higher priority interrupt
The darker part of the bar represents cycles left to execute and the lighter part represents cycles which have been executed. Use the buttons to add jobs and interrupts to the simulation and the toggles to change the scheduler type (see below), max time slice and speed of the animation.
The above animation simulates the idea of scheduling, as seen in the OCR A Level Computer Science course:
First come first served - this one basically executes the instructions in the order they are added to the queue.
Round robin - in this one, they are each executed in order, as with the previous type, however are given a time slice (this can be toggled above), if the job is unfinished when it has used the time slice, it is sent to the back of the queue and the next instruction is started
Shortest time remaining - this one executes jobs based on the amount of time remaining, if some cycles have already started, the time remaining will only be part of the full time for that job
Shortest job first - this one is as above but only focuses on how long the whole job takes, regardless of if some cycles are already started.
Multi-level feedback queue - this one is not simulated above as it would be very hard to implement however, it basically gives all jobs a priority and those which are using up too much CPU time are then given a lower priority and those which haven't run for a long time are given higher priority. Processes depending on input and output are kept in high priority queues as they require losts of processing time. This means that more important jobs are dealt with quickly, not just interrupts.