Processes and operating systems

Slides:



Advertisements
Similar presentations
Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Advertisements

Chapter 7 - Resource Access Protocols (Critical Sections) Protocols: No Preemptions During Critical Sections Once a job enters a critical section, it cannot.
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Processes and operating systems zScheduling policies: yRMS; yEDF. zScheduling modeling.
Task Allocation and Scheduling n Problem: How to assign tasks to processors and to schedule them in such a way that deadlines are met n Our initial focus:
Tasks Periodic The period is the amount of time between each iteration of a regularly repeated task Time driven The task is automatically activated by.
Module 2 Priority Driven Scheduling of Periodic Task
CPU SCHEDULING RONG ZHENG. OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed.
Courseware Scheduling Uniprocessor Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
Chapter 6 Dynamic Priority Servers
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
EE 249, Fall Discussion: Scheduling Haibo Zeng Amit Mahajan.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
More Scheduling cs550 Operating Systems David Monismith.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Scheduling policies for real- time embedded systems.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 31 – Multimedia OS (Part 1) Klara Nahrstedt Spring 2011.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
RTOS task scheduling models
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Introduction to Embedded Systems Rabie A. Ramadan 5.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
Sandtids systemer 2.modul el. Henriks 1. forsøg m. Power Point.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 32 – Multimedia OS Klara Nahrstedt Spring 2010.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Scheduling.
Lecture 6: Real-Time Scheduling
Real-Time Operating Systems RTOS For Embedded systems.
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
Embedded System Scheduling
REAL-TIME OPERATING SYSTEMS
Rate Monotonic Analysis Xinrong Zhou
EMERALDS Landon Cox March 22, 2017.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Networks and Operating Systems: Exercise Session 2
Wayne Wolf Dept. of EE Princeton University
Unit OS9: Real-Time and Embedded Systems
EEE 6494 Embedded Systems Design
Chapter 2.2 : Process Scheduling
Lecture 4 Schedulability and Tasks
Lecture 24: Process Scheduling Examples and for Real-time Systems
Chapter 6: CPU Scheduling
Process Scheduling B.Ramamurthy 11/18/2018.
Chapter 6: CPU Scheduling
Realtime Scheduling Algorithms
Chapter 6 Dynamic Priority Servers
Operating System Concepts
Real Time Scheduling Mrs. K.M. Sanghavi.
Processes and operating systems
TDC 311 Process Scheduling.
Dynamic Voltage Scaling
Ch4 Process and Operating System
CSCI1600: Embedded and Real Time Software
Scheduling.
CPU SCHEDULING.
Processes and operating systems
CSCI1600: Embedded and Real Time Software
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Real-Time Process Scheduling Concepts, Design and Implementations
Chapter 6: CPU Scheduling
Ch 4. Periodic Task Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
CPU Scheduling CSE 2431: Introduction to Operating Systems
Presentation transcript:

Processes and operating systems Scheduling policies: RMS; EDF. Scheduling modeling assumptions. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. Metrics How do we evaluate a scheduling policy: Ability to satisfy all deadlines. CPU utilization---percentage of time devoted to useful work. Scheduling overhead---time required to make scheduling decision. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Rate monotonic scheduling RMS (Liu and Layland): widely-used, analyzable scheduling policy. Analysis is known as Rate Monotonic Analysis (RMA). © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. RMA model All process run on single CPU. Zero context switch time. No data dependencies between processes. Process execution time is constant. Deadline is at end of period. Highest-priority ready process runs. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. Process parameters Ti is computation time of process i; ti is period of process i. period ti Pi computation time Ti © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Rate-monotonic analysis Response time: time required to finish process. Critical instant: scheduling state that gives worst response time. Critical instant occurs when all higher-priority processes are ready to execute. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. Critical instant P1 P2 P3 interfering processes P1 P2 P3 critical instant P4 © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. RMS priorities Optimal (fixed) priority assignment: shortest-period process gets highest priority; priority inversely proportional to period; break ties arbitrarily. No fixed-priority scheme does better. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. RMS example P2 period P2 P1 period P1 P1 P1 5 10 time © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. RMS CPU utilization Utilization for n processes is S i Ti / ti As number of tasks approaches infinity, maximum utilization approaches 69%. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

RMS CPU utilization, cont’d. RMS cannot use 100% of CPU, even with zero context switch overhead. Must keep idle cycles available to handle worst-case scenario. However, RMS guarantees all processes will always meet their deadlines. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. RMS implementation Efficient implementation: scan processes; choose highest-priority active process. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Earliest-deadline-first scheduling EDF: dynamic priority scheduling scheme. Process closest to its deadline has highest priority. Requires recalculating processes at every timer interrupt. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. EDF analysis EDF can use 100% of CPU. But EDF may fail to miss a deadline. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. EDF implementation On each timer interrupt: compute time to deadline; choose process closest to deadline. Generally considered too expensive to use in practice. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Fixing scheduling problems What if your set of processes is unschedulable? Change deadlines in requirements. Reduce execution times of processes. Get a faster CPU. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. Priority inversion Priority inversion: low-priority process keeps high-priority process from running. Improper use of system resources can cause scheduling problems: Low-priority process grabs I/O device. High-priority device needs I/O device, but can’t get it until low-priority process is done. Can cause deadlock. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Solving priority inversion Give priorities to system resources. Have process inherit the priority of a resource that it requests. Low-priority process inherits priority of device if higher. © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Overheads for Computers as Components 2nd ed. Data dependencies Data dependencies allow us to improve utilization. Restrict combination of processes that can run simultaneously. P1 and P2 can’t run simultaneously. P1 P2 © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.

Context-switching time Non-zero context switch time can push limits of a tight schedule. Hard to calculate effects---depends on order of context switches. In practice, OS context switch overhead is small (hundreds of clock cycles) relative to many common task periods (ms – ms). © 2008 Wayne Wolf Overheads for Computers as Components 2nd ed.