Scheduling

Only available on StudyMode
  • Topic: Operating system, Scheduling, Computer multitasking
  • Pages : 19 (2206 words )
  • Download(s) : 143
  • Published : April 12, 2013
Open Document
Text Preview
Operating Systems III. Scheduling
Ludovic Apvrille
Telecom ParisTech Eurecom, Office 470 ludovic.apvrille@telecom-paristech.fr

Fall 2012

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Definitions Switching Between Processes

Outline

Basics of Scheduling Definitions Switching Between Processes Scheduling algorithms Scheduling in Windows and Linux

Ludovic Apvrille

Operating Systems - III. Scheduling - Fall 2012

2 / 33

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Definitions Switching Between Processes

Scheduling Criteria
All systems
◮ ◮

Fairness: Giving each process a fair share of the CPU Policy enforcement: No process should be able to overcome the rules of the system Balance: Keeping all parts of the system busy



Batch systems
◮ ◮

CPU utilization: Keep the CPU busy Throughput: Maximize the number of jobs that are completed per time unit (hour) Turnaround Time: Minimize time between submission and termination Ludovic Apvrille Operating Systems - III. Scheduling - Fall 2012 3 / 33



Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Definitions Switching Between Processes

Scheduling Criteria (Cont.)

Interactive systems
◮ ◮

Response time: Respond to interactions as fast as possible Proportionality: Meet users’ expectations

Real-time systems
◮ ◮

Meeting deadlines: Keep the CPU busy Predictability: Know in advance whether time constraints can always be met, or not.

Ludovic Apvrille

Operating Systems - III. Scheduling - Fall 2012

4 / 33

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Definitions Switching Between Processes

When to Schedule


At creation of a process


Run parent or child?

◮ ◮ ◮ ◮

At termination of a process When a process blocks on I/O, semaphore, etc. When I/O interrupt occurs At hardware clock interrupt ◮

Non-preemptive scheduling


◮ ◮ ◮

The same process is given the CPU until it blocks or voluntarily releases the CPU Only choice if no timer is available Windows 3.1 The same process can run only for a pre-defined time-interval The OS sets a timer to the time-interval Ludovic Apvrille Operating Systems - III. Scheduling - Fall 2012 5 / 33

Preemptive scheduling
◮ ◮

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Definitions Switching Between Processes

Non-Preemptive Scheduler

Ludovic Apvrille

Operating Systems - III. Scheduling - Fall 2012

6 / 33

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Definitions Switching Between Processes

Preemptive Scheduler

Ludovic Apvrille

Operating Systems - III. Scheduling - Fall 2012

7 / 33

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Definitions Switching Between Processes

Scheduling Implementation

Ludovic Apvrille

Operating Systems - III. Scheduling - Fall 2012

8 / 33

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Batch systems Interactive systems Multiprocessor systems

Outline

Basics of Scheduling Scheduling algorithms Batch systems Interactive systems Multiprocessor systems Scheduling in Windows and Linux

Ludovic Apvrille

Operating Systems - III. Scheduling - Fall 2012

9 / 33

Basics of Scheduling Scheduling algorithms Scheduling in Windows and Linux

Batch systems Interactive systems Multiprocessor systems

Presented Scheduling Algorithms
For batch systems
◮ ◮ ◮

For interactive systems
◮ ◮ ◮ ◮ ◮ ◮

First-Come First-Served Shortest Job First Shortest Remaining Time Next Three-level scheduling

Round-Robin scheduling Priority scheduling Multiple queues Guaranteed scheduling Lottery scheduling Fair-share scheduling



For multiprocessors systems
Presentation of three different approaches
Ludovic Apvrille

For RT systems
Attend lectures on RTOS to...
tracking img