Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks -...

22
Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    225
  • download

    3

Transcript of Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks -...

Page 1: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Scheduling

Basic Concepts

Ref: Hard Real-Time Computing SystemsGiorgio Buttazzo

Processes - Tasks - Threads

Page 2: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Nostalgia

Automobile Computers: 2006: 1-2 million lines of code

2010: 10 million lines of code

Apollo Guidance Computer First Microprocessor Microcontroller

99%+ of today’s computers are in embedded systems

Page 3: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

The Osborne I (1981)

Hardware:•Dual 5¼-inch floppy disk drives•4 MHz Z80 CPU•65 kilobytes main memory•Fold-down keyboard doubling as the computer case's lid•5-inch, 52 character × 24 line monochrome CRT display•Parallel printer port•Serial port for use with external modems or serial printers

Software:

CPM

Word Star

SuperCalc

Dbase II

CBasic

First Portable Computer

Page 4: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.
Page 5: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Orientation

• Schedule:

An assignment of tasks to the processor, so that each task is executed until completion

• Scheduling Policy:

Tasks assigned according to a predefined criterion

• Scheduling Algorithm:

The set of rules that determines the ordering of tasks

• Active Task Ready Task Running Task

(Ready Queue) (Dispatching)

Page 6: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Ready Queue

Page 7: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Definition of Schedule

What does it say?

Page 8: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Preemptive Schedules

Page 9: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Categories of Schedules

Page 10: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Deadlines

• Deadline:

Absolute – with respect to real-time (time zero)

Relative – with respect to arrival time

Page 11: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Real-Time Task Parameters

Page 12: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Real-Time Task Parameters

Page 13: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Periodic vs Aperiodic Tasks

Page 14: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Precedence Constraints

Page 15: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Precedence Example

Page 16: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Critical Sections

Binary Semaphore

Page 17: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Critical Section Example

Page 18: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Critical Section Model

Page 19: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Definition of Scheduling Problems

Page 20: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Classification of Scheduling Algorithms

Page 21: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Guarantee-Based Algorithms

Page 22: Scheduling Basic Concepts Ref: Hard Real-Time Computing Systems Giorgio Buttazzo Processes - Tasks - Threads.

Domino Effect Degradation