2.1.9

Types of Scheduling

Test yourself on Types of Scheduling

Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Types of Scheduling

Operating systems use schedulers to manage the jobs that are being completed by the CPU to ensure maximum use of processing time.

Round robin

Round robin

  • Round robin is the most basic of scheduler.
  • In this system each time a job comes in to be completed it is added to the end of a queue.
  • Each job is given an amount of CPU time to be completed in.
Round robin cont.

Round robin cont.

  • If the job completes within this time, then the next job is loaded.
  • If the job is not completed, then it is pushed to the bottom of the queue and waits for its next slot of CPU time.
    • This is fine if all the jobs are similar in size and similar in priority.
  • This system ignores any priority of a job and ignores that each job will take different amounts of time so can be very inefficient.
First come first served (FCFS)

First come first served (FCFS)

  • First come first served (FCFS) is another scheduler that is easy to set up and manage.
  • As jobs come in to be completed, they are added to a queue.
  • Jobs are completed in the order they came in regardless of the time taken to complete.
First come first served (FCFS) cont.

First come first served (FCFS) cont.

  • This system is very easy to set up and great for getting things done in the set order of arrival.
  • This system can cause a long delay in getting jobs done, especially if higher up jobs in the queue are big tasks that take a long time.
  • First come first served scheduling generates bad performance within a computer system.
Multilevel feedback queues

Multilevel feedback queues

  • Multilevel feedback queues are the most complex form of scheduling but also give the best results.
  • The scheduler maintains many queues of jobs, usually grouped by priority and similarity of job.
  • The CPU will switch between queues to get jobs to complete.
Multilevel feedback queues cont.

Multilevel feedback queues cont.

  • If a job is waiting too long in one queue it will be moved to a higher priority location in another queue to get the job completed quicker.
  • Each separate queue has its own scheduler to maintain that queue.
  • This system offers the best results, but is very CPU intensive.

Types of Scheduling

Operating systems use schedulers to manage the jobs that are being completed by the CPU to ensure maximum use of processing time.

Shortest job first

Shortest job first

  • Shortest job first is a scheduler that selects the shortest job in the queue to complete first.
  • Shortest job first can have the shortest waiting time of all the schedulers.
Shortest job first cont.

Shortest job first cont.

  • As it is always looking for the shortest job first, larger processes can face “starvation” and not get completed.
  • Shortest job first is not very feasible for implementation as the operating system rarely knows the amount of time to complete each new job.
  • The operating system has to use estimation based on a record of all previous jobs.
Shortest remaining time

Shortest remaining time

  • Shortest time remaining is a preemptive version of shortest job first.
  • As a job arrives, it is compared to the currently running job (which is currently the shortest job) if it is longer than the current job then it is added to a queue.
  • If the new job is shorter than the current job, then the current job is pushed to the queue and the new job is worked on.
Shortest remaining time cont.

Shortest remaining time cont.

  • As a job completes, the scheduler assesses the queue and selects the next shortest job to complete.
  • This scheduler requires very little CPU usage as it only makes a comparison as a job arrives or as it completes a job.
  • Short jobs are always completed quickly, but bigger jobs will face starvation.
Jump to other topics
1

Components of a Computer

2

Software & Software Development

3

Exchanging Data

4

Data Types, Data Structures & Algorithms

5

Legal, Moral, Cultural & Ethical Issues

6

Elements of Computational Thinking

6.1

Thinking Abstractly

6.2

Thinking Ahead

6.3

Thinking Procedurally

6.4

Thinking Logically

6.5

Thinking Concurrently

7

Problem Solving & Programming

8

Algorithms

Practice questions on Types of Scheduling

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
Answer all questions on Types of Scheduling

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium