Scheduling Algorithm and Analysis

Similar documents
Embedded Systems Programming

Embedded Software Programming

Precedence Graphs Revisited (Again)

Introduction to Embedded Systems

Tasks. Task Implementation and management

Multiprocessor and Real- Time Scheduling. Chapter 10

1.1 CPU I/O Burst Cycle

Introduction to Real-Time Systems and Multitasking. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

Aperiodic Servers (Issues)

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system


Embedded System Programming

2. Introduction to Software for Embedded Systems

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Microkernel/OS and Real-Time Scheduling

Event-Driven Scheduling. (closely following Jane Liu s Book)

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

Simplified design flow for embedded systems

Real-time operating systems and scheduling

Lecture 3. Introduction to Real-Time kernels. Real-Time Systems

Analysis and Implementation of Global Preemptive Fixed-Priority Scheduling with Dynamic Cache Allocation

Multiprocessor and Real-Time Scheduling. Chapter 10

Reference Model and Scheduling Policies for Real-Time Systems

COMP 3361: Operating Systems 1 Final Exam Winter 2009

Exam Review TexPoint fonts used in EMF.

Scheduling Bits & Pieces

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

Enriching Enea OSE for Better Predictability Support

Introduction to Computers and Programming

Department of Computer Science Institute for System Architecture, Operating Systems Group REAL-TIME MICHAEL ROITZSCH OVERVIEW

Lecture 12: An Overview of Scheduling Theory

Verification of Real-Time Systems Resource Sharing

Embedded Systems Programming

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

CLOCK DRIVEN SCHEDULING

Systemy RT i embedded Wykład 11 Systemy RTOS

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institution of Technology, IIT Delhi

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

Computer Systems Assignment 4: Scheduling and I/O

Analyzing Real-Time Systems

SMD149 - Operating Systems

CS4514 Real Time Scheduling

EE458 - Embedded Systems Modularization

Your (ES1) programs so far (ES1) software development so far

Embedded Systems Programming

Real-Time Performance of Linux. OS Latency

Time Triggered and Event Triggered; Off-line Scheduling

REAL-TIME OVERVIEW SO FAR MICHAEL ROITZSCH. talked about in-kernel building blocks:

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important?

Midterm Exam Amy Murphy 19 March 2003

Real-time Support in Operating Systems

Thread and Synchronization

3.1 Introduction. Computers perform operations concurrently

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Real-Time Systems and Programming Languages

G Robert Grimm New York University

Interactive Scheduling

Two Level Scheduling. Interactive Scheduling. Our Earlier Example. Round Robin Scheduling. Round Robin Schedule. Round Robin Schedule

Copyright Notice. COMP9242 Advanced Operating Systems S2/2014 Week 9: Real-Time Systems. Real-Time System: Definition

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

Non-Blocking Write Protocol NBW:

Processes (Tasks) and operating systems. Why multiple processes? Example: engine control

Operating Systems: Quiz2 December 15, Class: No. Name:

Outline. Process and Thread Management. Data Structures (2) Data Structures. Kernel Process Block (PCB)

Process and Thread Management

Process Scheduling Part 2

EMERALDS: a small-memory real-time microkernel

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

Process Scheduling. Copyright : University of Illinois CS 241 Staff

4/6/2011. Informally, scheduling is. Informally, scheduling is. More precisely, Periodic and Aperiodic. Periodic Task. Periodic Task (Contd.

Scheduling. Scheduling. Scheduling. Scheduling Criteria. Priorities. Scheduling

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

Operating Systems Comprehensive Exam. Spring Student ID # 2/17/2011

Ensuring Schedulability of Spacecraft Flight Software

The Real-time Specification for Java

Multimedia Systems 2011/2012

Operating Systems. Process scheduling. Thomas Ropars.

Chapter 13: I/O Systems

Announcements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed)

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

ECE 3055: Final Exam

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Global Scheduling in Multiprocessor Real-Time Systems

CS 153 Design of Operating Systems Winter 2016

Real Time Kernels and Operating Systems Introduction

Scheduling of processes

Operating System Concepts Ch. 5: Scheduling

I/O AND DEVICE HANDLING Operating Systems Design Euiseong Seo

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition

Chapter 12: I/O Systems

Chapter 13: I/O Systems

Chapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

Efficient Event-Triggered Tasks in an RTOS

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1

RT extensions/applications of general-purpose OSs

Transcription:

Scheduling Algorithm and Analysis Model and Cyclic Scheduling (Module 27) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014

Task Scheduling Schedule: to determine which task is assigned to a processor at any time order of execution meet deadlines, fast response time, utilize resource effectively Need an algorithm to generate a schedule optimal scheduling algorithm: always find a feasible schedule if and only if a feasible schedule exists Scheduler or dispatcher: the mechanism to implement a schedule Misconcept: RTOS will schedule tasks to meet task deadlines A good schedule will reduce CPU load 1

Task Functional Parameters Preemptivity: suspend the executing job and switch to the other one should a job (or a portion of job) be preemptable context switch: save the current process status (PC, registers, etc.) and initiate a ready job transmit a UDP package, write a block of data to disk, a busy waiting loop Preemptivity of resources: concurrent use of resources or critical section lock, semaphore, disable interrupts How can a context switch be triggered? Assume you want to preempt an executing job -- why a higher priority job arrives run out the time quantum waiting blocked wake-up executing ready suspended dispatched 2

Event- and Time-Triggered Systems Time-triggered control system All activities are carried out at certain points in time know a priori at design time (based on a globally synchronized time base) Transmission of messages Task execution Monitoring of external states All nodes have a common notion of time Event-triggered control system All activities are carried out in response to events external to the system Reception of a message Termination of a task External interrup 3

Major and Minor Cycle Model Time is divided into equal-sized frame minor cycle = length of frame Major cycle = length of schedule = k * minor_cycle An example: A=(10,4) B=(20,6) C=(30,5) major cycle=60, minor cycle=10 scheduling string AB_AC_AB_AC_AB_A_ Jobs must be done within a minor cycle limit timing error to one frame suspend and resume as background, continue, or abort if overrun 0 10 20 30 40 50 60 4

An Example A1 must be done at least every 10ms, and takes 1ms A2 must be completed with 5ms when E occurs and takes 2 ms E must be detected by polling and is detectable for at least 0.5 ms 0.5ms E would not occur twice within 50 ms polling of E takes 0 overhead 5

Major/Minor Cyclic Scheduling There should be a periodic polling action for E Assume a timer of 0.5ms to activate polling operation and no polling overhead Should be an interval of 2ms to execute A2 for an arbitrary 5ms interval May detect E in the first frame and execute A2 in the second frame period=2.5ms A2 takes 2ms if E, otherwise is 0 WCET=2ms Should be an interval of 1ms to execute A1 for an arbitrary 10ms interval Period= 10ms, WCET= 1ms Since 2ms + 1ms > 2.5ms, we will divide A1 into two parts of 0.5ms A2 A1_1 A2 A1_2 A2 A2 A2 A1_1 A2 A1_2 A2 A2 6

Pros Summary of Cyclic Schedule simple, table-driven, easy to validate (knows what is doing at any moment) fit well for harmonic periods and small system variations static schedule deterministic, static resource allocation, no preemption small jitter no scheduling anomalies Cons difficult to change (need to re-schedule all tasks) fixed released times for the set of tasks difficult to deal with different temporal dependencies schedule algorithm may get complex (NP-hard) doesn t support aperiodic and sporadic tasks efficiently 7