Scheduling

Scheduling is where a computer prioritises tasks to be carried out in a certain order to maximise the use of the computer and all of its peripherals.


The algorithm must be robust so the computer does not freeze and also so every task/user gets a fair response time.

Two main types of jobs are I/O bound jobs and processor bound jobs:

I/O bound jobs (input/output) examples:
  1. Sending a document to the printer.
  2. Moving the mouse.
  3. Typing on the keyboard.

Processor bound jobs examples:
  1. Playing Music
  2. Watching a video
  3. Calculating in Excel.

There are different ways a processor can prioritise tasks:


  • FCFS (first come first served) - tasks are started and completed in the order they are received.
  • RR (round robin) – the time slice is 1 minute - each job has a minute spent on it before moving onto the next one. This occurs in a circuit until all jobs are complete.
  • SJF – shortest job first - The job with the shortest completion time is carried out first before moving onto longer jobs.
  • SRT – shortest remaining time first - The job with the least amount of time remaining to complete is carried out first.
  • MFQ - Complex algorithms that set up a league table system and jobs rated according to time left, resources required and importance.

The scheduler has three parts:

  • High Level Scheduler - High level scheduling is when a computer system chooses which jobs, tasks or requests to process 
  • Medium Level Scheduler - Medium level scheduling does not apply to all operating systems. It determines whether some tasks or requests should be temporarily placed in a system's secondary memory and removed from the main memory.
  • Low Level Scheduler - Low level scheduling is when a system actually assigns a processor to a task that is ready to be worked on. In other words, in low level scheduling, a system assigns a specific component or internal processor to a specific task based on priority level.

Analogy of Scheduling (night club scene):


Comments

Popular posts from this blog

CPU Fetch-Decode-Execute Cycle

Utility Software