# Lecture 3 Theoretical Foundations of RTOS

Save this PDF as:

Size: px
Start display at page:

Download "Lecture 3 Theoretical Foundations of RTOS"

## Transcription

1 CENG 383 Real-Time Systems Lecture 3 Theoretical Foundations of RTOS Asst. Prof. Tolga Ayav, Ph.D. Department of Computer Engineering

2 Task States Executing Ready Suspended (or blocked) Dormant (or sleeping)

3 Task State Diagram

4 Task Control Block

5 RT Scheduling Among many functions, scheduling is the most important function of a real-time kernel A realtime application is composed of as a set of coordinated tasks. We can categorize the task according to their activation: Periodic tasks Sporadic tasks Aperiodic tasks Periodic tasks are started at regular intervals and has to be completed before some deadline. Sporadic tasks are appeared irregularly, but within a bounded frequency. Aperiodic tasks parameters are completely unknown.

6 RT Tasks We can use the following quintuple to express task τi: < τ i, bi, ci, fi, di> bi is begin time of τi ci is computation time of τi di is the deadline fi is the frequency (for sporadic tasks it s the bound) For schedulability, at least the following conditions must be met: ci < di bi < 1/fi Σci fi available resource

7 RT Tasks We can also categorize tasks according to their time criticality: Hard real-time tasks Soft real-time tasks Non real-time tasks (background tasks)

8 Simple Task Model All tasks in the task set are strictly periodic. The relative deadline of a task is equal to its period/frame. All tasks are independent; there are no precedence constraints. No task has any nonpreemptible section, and the cost of preemption is negligible. Only processing requirements are significant; memory and I/O requirements are negligible.

9 Scheduling Techniques Dynamic Scheduling Static priority-driven preemptive scheduling(rm) Dynamic priority-driven preemptive scheduling(edf) Adaptive scheduling(fc-edf) Round-Robin Scheduling Cooperative Scheduling Techniques... Static Scheduling AAA (algorithm architecture adequation)...

10 Round-Robin Scheduling Each executable task is assigned a fixed-time quantum called a time slice in which to execute. The task executes until it completes, or its execution time expires. Task switching occurs then. Round-robin systems can be combined with preemptive priority systems, yielding a kind of mixed system:

11 Cyclic Executives (1) Execution of periodic tasks on a processor according to a pre-run time schedule. CE is a table of procedure calls, where each task is a procedure, within a single do loop. The major cycle is the minimum time required to execute tasks allocated to the processor, ensuring that the deadlines and periods of all processes are met. Hyperperiod = LCM ( 2 T, T, K, T ) 1 n Scheduling decisions are made at the beginning of each frame. No preemption within each frame. Frames must be sufficiently long so that every task can start and complete within a single frame. R 1 : f max 1 i n c i

12 Cyclic Executives (2) In order to keep the length of the cyclic schedule as short as possible, the frame size, f, should be chosen so that the hyperperiod has an integer number of frames: Ti Ti R2 : = f f In order to ensure that every task completes by its deadline, frames must be small so that between the release time and deadline of every task, there is at least one frame. The following relation is derived for a worst-case scenario, which occurs when the period of a process starts just after the beginning of a frame and, consequently, the process cannot be released until the next frame. 0 R 3 : 2 f gcd( T, f ) i D i

13 Example Frame Calculation Possible value of f could be any of the values of 3, 4 and 5.

14 Rate-Monotonic Scheduling Assumptions: 1. Simple task model: No interprocess communication and all tasks are periodic 2. Tasks have priorities which are inversly proportional to their periods. 3. Tasks deadlines are equal to their periods. 4. A high priority task may preempt lower priority tasks. Liu and Layland (1973) proved that for a set of n periodic tasks with unique periods, a feasible schedule that will always meet deadlines exists if the CPU utilization is: Where Ci is the computation time of a task i, Ti is the deadline of task i and n is the number of tasks. For example, for n=2, U

15 Rate-Monotonic Scheduling When number of tasks approaches to infinity, this utilization bound will converge to: Example: Task Execution Time Period τ1 1 8 τ2 2 5 τ Thus, the system is schedulable

16 Sample Task Scheduling Three periodic tasks: A, B, C T is period, D is deadline and C is execution time uniprocessor

17 Earliest-Deadline-First Scheduling Priorities are changed dynamically Task with the earliest deadline gets the highest priority Unless RM, utilization may go up to 100%

18 RM vs.edf EDF is more flexible and achieves better utilization. RM is more predictable especially in overload conditions:the same lower-priority tasks miss deadlines every time. İn EDF, it is difficult to predict which tasks will miss their deadlines during overloads. RM tends to need more preemption. EDF only preempts when an earlier-deadline task arrives. For further discussion, read: Buttazzo, G. C Rate monotonic vs. EDF: judgment day. Real-Time Syst. 29, 1 (Jan. 2005), DOI=

19 Imprecise Computations In case that digital signal processing algorithms are performed, The system may get overloaded. For example, a Taylor series expansion (perhaps using look-up tables for function derivatives) can be terminated early, at a loss of accuracy, but with improved performance. Tasks can be divided into two parts: Mandatory and Optional. Various methods: Sieve, Multiple-versions etc. For example, a digital filtering task might be implemented as 4 versions such that each version has different filter characteristics, contributions and consequently computation requirements. In overload conditions, the scheduler may schedule shorter versions. Requires an adaptive scheduling algorithm. Their applications can be seen on network systems. See Stankovic s works for further details.

20 FC-EDF Scheduler Simulator

21 Critical Regions

22 Semaphores

23 Counting Semaphores If there are more than one resources:

24 Deadlock Four conditions are necessary for deadlock: 1. Mutual exclusion 2. Circular wait 3. Hold and wait 4. No preemption Eliminating any of them will prevent deadlock from occuring.

25 POSIX POSIX is the IEEE s Portable Operating System Interface for Computer Environments.The standard provides compliance criteria for operating system services and is designed to allow applications programs to write applications that can easily port across operating systems. For further details, read POSIX.pdf

26 RT-Linux RT-Linux is an operating system, in which a small real-time kernel co-exists with standard Linux kernel The real-time kernel sits between standard Linux kernel and the h/w. The standard Linux kernel sees this real-time layer as actual h/w The real-time kernel intercepts all hardware interrupts. Only for those RTLinux-related interrupts, the appropriate ISR is run. All other interrupts are held and passed to the standard Linux kernel as software interrupts when the standard Linux kernel runs. The real-time kernel assigns the lowest priority to the standard Linux kernel. Thus the realtime tasks will be executed in real-time user can create realtime tasks and achieve correct timing for them by deciding on scheduling algorithms, priorities, execution freq, etc. Realtime tasks are privileged (that is, they have direct access to hardware), and they do NOT use virtual memory.

27 RT-Linux

28 RT-Linux

29 Scheduler RT-Linux contains a dynamic scheduler RT-Linux has many kinds of schedulers The EDF (Earliest Deadline First) scheduler Rate-monotonic scheduler Real-time FIFOs RT-FIFOs are used to pass information between realtime process and ordinary Linux process. RT-FIFOs are designed to never block the real-time tasks. RT-FIFOs are, like realtime tasks, never page out. This eliminates the problem of unpredictable delay due to paging.

30 Time Resolution If the kernel was patched with UTIME, we could schedule processes with microsecond resolution. Running rtlinx-v3.0 Kernel on the 486 allows stable hard real-time operation. Giving: 15 microseconds worst case jitter. 10 microseconds event resolution. 17 nanoseconds timer resolution. 6 microseconds interrupt response time. (This value was measured on interrupts on the parallel port) High resolution timing functions give nanosecond resolution (limited by the hardware only)

31 Linux v.s. RTLinux Linux Non-real-time Features Linux scheduling algorithms are not designed for real-time tasks Provide good average performance or throughput Unpredictable delay Uninterruptible system calls, the use of interrupt disabling virtual memory support (context switch may take hundreds of microsecond). Linux Timer resolution is coarse, 10ms Linux Kernel is Non-preemptible. RTLinux Real-time Features Support real-time scheduling Predictable delay (by its small size and limited operations) Finer time resolution Preemptible kernel No virtual memory support

### Lecture 9 Real-Time Application Interface for Linux

CENG 314 Embedded Computer Systems Lecture 9 Real-Time Application Interface for Linux Asst. Prof. Tolga Ayav, Ph.D. Department of Computer Engineering İzmir Institute of Technology RTOS Operating system

### Real-Time Scheduling (Part 1) (Working Draft) Real-Time System Example

Real-Time Scheduling (Part 1) (Working Draft) Insup Lee Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania www.cis.upenn.edu/~lee/ CIS 41,

### EECE 276 Embedded Systems

EECE 276 Embedded Systems RTOS Basics Process scheduling EECE 276 Embedded Systems RTOS Basics 1 RTOS Basics Kernel: schedules tasks Tasks: concurrent activity with its own state (PC, registers,stack,

### Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Overview of Real-Time Scheduling Embedded Real-Time Software Lecture 3 Lecture Outline Overview of real-time scheduling algorithms Clock-driven Weighted round-robin Priority-driven Dynamic vs. static Deadline

### COS 318: Operating Systems. CPU Scheduling. (http://www.cs.princeton.edu/courses/cos318/)

COS 318: Operating Systems CPU Scheduling (http://www.cs.princeton.edu/courses/cos318/) Today s Topics! CPU scheduling! CPU Scheduling algorithms 2 When to Schedule?! Process/thread creation! Process/thread

### Real-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2

Real-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2 Lecture Outline Scheduling periodic tasks The rate monotonic algorithm Definition Non-optimality Time-demand analysis...

### COMPLEX EMBEDDED SYSTEMS

COMPLEX EMBEDDED SYSTEMS Real-Time Scheduling Summer Semester 2012 System and Software Engineering Prof. Dr.-Ing. Armin Zimmermann Contents Introduction Scheduling in Interactive Systems Real-Time Scheduling

### Periodic Task Scheduling

Periodic Task Scheduling Radek Pelánek Motivation and Assumptions Examples of Periodic Tasks sensory data acquisition control loops action planning system monitoring Motivation and Assumptions Simplifying

### Comparison between scheduling algorithms in RTLinux and VxWorks

Comparison between scheduling algorithms in RTLinux and VxWorks Linköpings Universitet Linköping 2006-11-19 Daniel Forsberg (danfo601@student.liu.se) Magnus Nilsson (magni141@student.liu.se) Abstract The

### Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No. # 26 Real - Time POSIX. (Contd.) Ok Good morning, so let us get

### Predictable response times in event-driven real-time systems

Predictable response times in event-driven real-time systems Automotive 2006 - Security and Reliability in Automotive Systems Stuttgart, October 2006. Presented by: Michael González Harbour mgh@unican.es

### multiple processes are kept in memory simultaneously when one process is waiting, another process executes

Terminology. Reference: Section 4.2, 5.1 Time-sharing / multiprogramming Typical proc. alternates between CPU bursts and I/O bursts To maximize CPU utilization: multiple processes are kept in memory simultaneously

### 4. Fixed-Priority Scheduling

Simple workload model 4. Fixed-Priority Scheduling Credits to A. Burns and A. Wellings The application is assumed to consist of a fixed set of tasks All tasks are periodic with known periods This defines

### 174: Scheduling Systems. Emil Michta University of Zielona Gora, Zielona Gora, Poland 1 TIMING ANALYSIS IN NETWORKED MEASUREMENT CONTROL SYSTEMS

174: Scheduling Systems Emil Michta University of Zielona Gora, Zielona Gora, Poland 1 Timing Analysis in Networked Measurement Control Systems 1 2 Introduction to Scheduling Systems 2 3 Scheduling Theory

### COS 318: Operating Systems. CPU Scheduling. Kai Li and Andy Bavier Computer Science Department Princeton University

COS 318: Operating Systems CPU Scheduling Kai Li and Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall13/cos318/ Quiz 1 u Avg score: 10.7 u Suggested

### CPU Scheduling. Outline

CPU Scheduling Thomas Plagemann (with slides from Otto J. Anshus, Kai Li, Pål Halvorsen and Andrew S. Tanenbaum) Goals of scheduling Outline Scheduling algorithms: FCFS/FIFO, RR, STCF/SRTCF Priority (CTSS,

### Introduction to CPU Scheduling

Introduction to CPU Scheduling Minsoo Ryu Department of Computer Science and Engineering 2 1 Process Scheduling Page X 2 Priority-Based Scheduling Page X 3 Proportional Share Scheduling Page X 4 Q & A

### 3. Scheduling issues. Common approaches /1. Common approaches /2. Common approaches /3. 2012/13 UniPD / T. Vardanega 23/01/2013. Real-Time Systems 1

Common approaches /1 3. Scheduling issues Clock-driven (time-driven) scheduling Scheduling decisions are made beforehand (off line) and carried out at predefined time instants The time instants normally

### CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

CPU SCHEDULING CPU SCHEDULING (CONT D) Aims to assign processes to be executed by the CPU in a way that meets system objectives such as response time, throughput, and processor efficiency Broken down into

### The simple case: Cyclic execution

The simple case: Cyclic execution SCHEDULING PERIODIC TASKS Repeat a set of aperiodic tasks at a specific rate (cycle) 1 2 Periodic tasks Periodic tasks (the simplified case) Scheduled to run Arrival time

### EE8205: Embedded Computer System Multitasking and Real-time Operating System -- Problem Set 2014 Solutions

EE8205: Embedded Computer System Multitasking and Real-time Operating System -- Problem Set 2014 Solutions Out: November 26, 2014 P. 1: What is the difference between turnaround time and response time.

### Module 6. Embedded System Software. Version 2 EE IIT, Kharagpur 1

Module 6 Embedded System Software Version 2 EE IIT, Kharagpur 1 Lesson 30 Real-Time Task Scheduling Part 2 Version 2 EE IIT, Kharagpur 2 Specific Instructional Objectives At the end of this lesson, the

### Priority-Driven Scheduling

Priority-Driven Scheduling Advantages of Priority-Driven Scheduling Priority-driven scheduling is easy to implement. It does not require the information on the release times and execution times of the

### Real-time scheduling algorithms, task visualization

Rochester Institute of Technology RIT Scholar Works Theses Thesis/Dissertation Collections 2006 Real-time scheduling algorithms, task visualization Kevin Churnetski Follow this and additional works at:

### Operating Systems. III. Scheduling. http://soc.eurecom.fr/os/

Operating Systems Institut Mines-Telecom III. Scheduling Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ Outline Basics of Scheduling Definitions Switching

### Common Approaches to Real-Time Scheduling

Common Approaches to Real-Time Scheduling Clock-driven time-driven schedulers Priority-driven schedulers Examples of priority driven schedulers Effective timing constraints The Earliest-Deadline-First

### Performance Comparison of RTOS

Performance Comparison of RTOS Shahmil Merchant, Kalpen Dedhia Dept Of Computer Science. Columbia University Abstract: Embedded systems are becoming an integral part of commercial products today. Mobile

### Processes and operating systems. Metrics. Rate Monotonic Scheduling. Scheduling policies: Scheduling modeling assumptions. Interprocess communication.

Processes and operating systems Scheduling policies: RMS; EDF. Scheduling modeling assumptions. Interprocess communication. Metrics How do we evaluate a scheduling policy: Ability to satisfy all deadlines.

### A Survey of Fitting Device-Driver Implementations into Real-Time Theoretical Schedulability Analysis

A Survey of Fitting Device-Driver Implementations into Real-Time Theoretical Schedulability Analysis Mark Stanovich Florida State University, USA Contents 1 Introduction 2 2 Scheduling Theory 3 2.1 Workload

### Embedded Systems. Real Time Systems (Part I) Real Time Operating System (RTOS) Definition and Characteristics

Embedded Systems Real Time Systems (Part I) Dr. Jeff Jackson Lecture 12-1 Real Time Operating System (RTOS) Definition and Characteristics A real-time operating system (RTOS) is an operating system (OS)

### Chapter 6 Process Scheduling

1 Chapter 6 Process Scheduling CPU scheduling deals with the problem of deciding which of the processes in the ready queue is to be allocated the CPU. There are many different CPU-scheduling algorithms.

### Real- Time Scheduling

Real- Time Scheduling Chenyang Lu CSE 467S Embedded Compu5ng Systems Readings Ø Single-Processor Scheduling: Hard Real-Time Computing Systems, by G. Buttazzo. q Chapter 4 Periodic Task Scheduling q Chapter

### Chapter 19: Real-Time Systems. Overview of Real-Time Systems. Objectives. System Characteristics. Features of Real-Time Systems

Chapter 19: Real-Time Systems System Characteristics Features of Real-Time Systems Chapter 19: Real-Time Systems Implementing Real-Time Operating Systems Real-Time CPU Scheduling VxWorks 5.x 19.2 Silberschatz,

### Real-Time Scheduling 1 / 39

Real-Time Scheduling 1 / 39 Multiple Real-Time Processes A runs every 30 msec; each time it needs 10 msec of CPU time B runs 25 times/sec for 15 msec C runs 20 times/sec for 5 msec For our equation, A

### Aperiodic Task Scheduling

Aperiodic Task Scheduling Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 12 Germany Springer, 2010 2014 年 11 月 19 日 These slides use Microsoft clip arts. Microsoft copyright

### CPU Scheduling. CPU Scheduling

CPU Scheduling Electrical and Computer Engineering Stephen Kim (dskim@iupui.edu) ECE/IUPUI RTOS & APPS 1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling

### Chapter 6 CPU Scheduling. Contents

Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

### Description of Project: Scheduling algorithms used in a particular application can have a significant impact on

MS project proposal: A comparison of real-time scheduling algorithms using visualization of tasks and evaluation of real-time extensions to Linux Kevin Churnetski Computer Science-RIT 8/21/2003 Abstract:

### 2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

Import Settings: Base Settings: Brownstone Default Highest Answer Letter: D Multiple Keywords in Same Paragraph: No Chapter: Chapter 5 Multiple Choice 1. Which of the following is true of cooperative scheduling?

### Today s topic: RTOS. OS kernel. Overall Stucture of Computer Systems. API/OS User Interface/Shell, Windows. Filesystem and Disk management.

Today s topic: RTOS 1 Overall Stucture of Computer Systems Application Program Application Program Application Program API/OS User Interface/Shell, Windows Filesystem and Disk management OS kernel Hardware

### The Design and Implementation of Real-Time Schedulers in RED-Linux

The Design and Implementation of Real-Time Schedulers in RED-Linux KWEI-JAY LIN, SENIOR MEMBER, IEEE AND YU-CHUNG WANG Invited Paper Researchers in the real-time system community have designed and studied

### ICS 143 - Principles of Operating Systems

ICS 143 - Principles of Operating Systems Lecture 5 - CPU Scheduling Prof. Nalini Venkatasubramanian nalini@ics.uci.edu Note that some slides are adapted from course text slides 2008 Silberschatz. Some

### Real-Time Software. Basic Scheduling and Response-Time Analysis. René Rydhof Hansen. 21. september 2010

Real-Time Software Basic Scheduling and Response-Time Analysis René Rydhof Hansen 21. september 2010 TSW (2010e) (Lecture 05) Real-Time Software 21. september 2010 1 / 28 Last Time Time in a real-time

### W4118 Operating Systems. Instructor: Junfeng Yang

W4118 Operating Systems Instructor: Junfeng Yang Outline Introduction to scheduling Scheduling algorithms 1 Direction within course Until now: interrupts, processes, threads, synchronization Mostly mechanisms

### Processor Scheduling. Background. Scheduling. Scheduling

Background Processor Scheduling The previous lecture introduced the basics of concurrency Processes and threads Definition, representation, management We now understand how a programmer can spawn concurrent

### CPU Scheduling. Overview: CPU Scheduling. [SGG7/8/9] Chapter 5. Basic Concepts. CPU Scheduler. Scheduling Criteria. Optimization Criteria

TDDB68 Concurrent programming and operating systems CPU Scheduling Overview: CPU Scheduling CPU bursts and I/O bursts Scheduling Criteria Scheduling Algorithms Priority Inversion Problem Multiprocessor

### Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

SFWR ENG 3BB4 Software Design 3 Concurrent System Design 2 SFWR ENG 3BB4 Software Design 3 Concurrent System Design 11.8 10 CPU Scheduling Chapter 11 CPU Scheduling Policies Deciding which process to run

### Real Time Scheduling Basic Concepts. Radek Pelánek

Real Time Scheduling Basic Concepts Radek Pelánek Basic Elements Model of RT System abstraction focus only on timing constraints idealization (e.g., zero switching time) Basic Elements Basic Notions task

### Today s topic: RTOS. Why OS?

Today s topic: RTOS 1 Why OS? To run a single program is easy What to do when several programs run in parallel? Memory areas Program counters Scheduling (e.g. one instruction each)... Communication/synchronization/semaphors

### CPU SCHEDULING CS 409, FALL 2013 SCHEDULING/1

CPU SCHEDULING Aims to assign processes to be executed by the CPU in a way that meets system objectives such as response time, throughput, and processor efficiency Broken down into three separate functions:

### Scheduling. from CPUs to Clusters to Grids. MCSN N. Tonellotto Complements of Distributed Enabling Platforms

Scheduling from CPUs to Clusters to Grids 1 Outline Terminology CPU Scheduling Real-time Scheduling Cluster Scheduling Grid Scheduling Cloud Scheduling 2 General Scheduling refers to allocate limited resources

### CPU scheduling. Kevin Marquet. September INSA Lyon / IF CITI Lab/INRIA Socrate

CPU scheduling Kevin Marquet INSA Lyon / IF CITI Lab/INRIA Socrate September 2014 CPU-I/O burst CPU burst : process requires CPU execution I/O burst : process waits for I/O completion (CPU-IO burst) (burst

### RTOS Real-Time Operating System

RTOS Real-Time Operating System What is a real-time system? A real-time system is any information processing system which has to respond to externally generated input stimuli within a finite and specified

### Today. Intro to real-time scheduling Cyclic executives. Scheduling tables Frames Frame size constraints. Non-independent tasks Pros and cons

Today Intro to real-time scheduling Cyclic executives Scheduling tables Frames Frame size constraints Generating schedules Non-independent tasks Pros and cons Real-Time Systems The correctness of a real-time

### CSC 539: Operating Systems Structure and Design. Spring 2006

CSC 539: Operating Systems Structure and Design Spring 2006 CPU scheduling historical perspective CPU-I/O bursts preemptive vs. nonpreemptive scheduling scheduling criteria scheduling algorithms: FCFS,

### Chapter 5: Process Scheduling

Chapter 5: Process Scheduling Chapter 5: Process Scheduling 5.1 Basic Concepts 5.2 Scheduling Criteria 5.3 Scheduling Algorithms 5.3.1 First-Come, First-Served Scheduling 5.3.2 Shortest-Job-First Scheduling

### Exercises : Real-time Scheduling analysis

Exercises : Real-time Scheduling analysis Frank Singhoff University of Brest June 2013 Exercise 1 : Fixed priority scheduling and Rate Monotonic priority assignment Given a set of tasks defined by the

### REAL TIME OPERATING SYSTEMS. Lesson-10:

REAL TIME OPERATING SYSTEMS Lesson-10: Real Time Operating System 1 1. Real Time Operating System Definition 2 Real Time A real time is the time which continuously increments at regular intervals after

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

Module 8 Industrial Embedded and Communication Systems Version 2 EE IIT, Kharagpur 1 Lesson 37 Real-Time Operating Systems: Introduction and Process Management Version 2 EE IIT, Kharagpur 2 Instructional

### Operating Systems Concepts: Chapter 7: Scheduling Strategies

Operating Systems Concepts: Chapter 7: Scheduling Strategies Olav Beckmann Huxley 449 http://www.doc.ic.ac.uk/~ob3 Acknowledgements: There are lots. See end of Chapter 1. Home Page for the course: http://www.doc.ic.ac.uk/~ob3/teaching/operatingsystemsconcepts/

### Introduction to Operating Systems. CS 499: Special Topics in Cyber Security S. Sean Monemi

Introduction to Operating Systems CS 499: Special Topics in Cyber Security S. Sean Monemi 1 Overview Operating Systems Definition Processes and Threads Program Control Blocks Process Scheduling and Interrupts

### CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Based on original slides by Silberschatz, Galvin and Gagne 1 Basic Concepts CPU I/O Burst Cycle Process execution

### CPU Scheduling. Prof. Sirer (dr. Willem de Bruijn) CS 4410 Cornell University

CPU Scheduling Prof. Sirer (dr. Willem de Bruijn) CS 4410 Cornell University Problem You are the cook at the state st. diner customers continually enter and place their orders Dishes take varying amounts

### Real-Time Operating Systems Lecture for the Embedded Systems Course CSD, University of Crete (May 23, 2014)

Real-Time Operating Systems Lecture for the Embedded Systems Course CSD, University of Crete (May 23, 2014) ManolisMarazakis (maraz@ics.forth.gr) Institute of Computer Science (ICS) Foundation for Research

### Periodic task model SCHEDULING PERIODIC TASKS. Periodic tasks. Assumptions on task sets. Periodic tasks (the simplified case)

Periodic tasks Arrival time C: computing time F: finishing/response time SCHEDULING PERIODIC TASKS R: release time T:period D: deadline time 1 2 Periodic tasks (the simplified case) Scheduled to run Arrival

### Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) CPU Scheduling: Overview. Scheduling: Components

Outline V22.0202-001 Computer Systems Organization II (Honors) (Introductory Operating Systems) Lecture 10 CPU Scheduling February 23, 2005 Announcements Lab 3 due on March 2 nd, Demos on March 2 nd and

### Why Linux is not an RTOS: porting hints

Why Linux is not an RTOS: porting hints Chris Simmonds 2net Limited Embedded Systems Conference UK. 2009 Copyright 2009, 2net Limited Overview Linux is a popular choice as an embedded OS Most projects

### CHAPTER 5 Exercises 5.1 Answer: 5.2 Answer: 5.3 lottery scheduling

CHAPTER 5 CPU scheduling is the basis of multiprogrammed operating systems. By switching the CPU among processes, the operating system can make the computer more productive. In this chapter, we introduce

### Operatin g Systems: Internals and Design Principle s. Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings

Operatin g Systems: Internals and Design Principle s Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings Operating Systems: Internals and Design Principles Bear in mind,

### Effective Scheduling Algorithm and Scheduler Implementation for use with Time-Triggered Co-operative Architecture

http://dx.doi.org/10.5755/j01.eee.20.6.7282 ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392 1215, VOL. 20, NO. 6, 2014 Effective Scheduling Algorithm and Scheduler Implementation for use with Time-Triggered

### CPU Scheduling. Multitasking operating systems come in two flavours: cooperative multitasking and preemptive multitasking.

CPU Scheduling The scheduler is the component of the kernel that selects which process to run next. The scheduler (or process scheduler, as it is sometimes called) can be viewed as the code that divides

### CPU scheduling. CPU Scheduling. No.4. CPU burst vs. I/O burst. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

EECS 3221 Operating System Fundamentals No.4 CPU scheduling Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University CPU Scheduling CPU scheduling is the basis of multiprogramming

### CS 571 Operating Systems. CPU Scheduling. Angelos Stavrou, George Mason University

CS 571 Operating Systems CPU Scheduling Angelos Stavrou, George Mason University CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms First-Come-First-Served Shortest-Job-First, Shortest-remaining-Time-First

### Process and Thread Scheduling. Raju Pandey Department of Computer Sciences University of California, Davis Winter 2005

Process and Thread Scheduling Raju Pandey Department of Computer Sciences University of California, Davis Winter 2005 Scheduling Context switching an interrupt occurs (device completion, timer interrupt)

### Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff

Process Scheduling CS 241 February 24, 2012 Copyright University of Illinois CS 241 Staff 1 Announcements Mid-semester feedback survey (linked off web page) MP4 due Friday (not Tuesday) Midterm Next Tuesday,

### Operating System Aspects. Real-Time Systems. Resource Management Tasks

Operating System Aspects Chapter 2: Basics Chapter 3: Multimedia Systems Communication Aspects and Services Multimedia Applications and Communication Multimedia Transfer and Control Protocols Quality of

### CHAPTER 5: PROCESS SCHEDULING (B) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 5: PROCESS SCHEDULING (B) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Multiple-Processor Scheduling CPU scheduling more complex when multiple CPUs are available Homogeneous processors

### CPU Scheduling Outline

CPU Scheduling Outline What is scheduling in the OS? What are common scheduling criteria? How to evaluate scheduling algorithms? What are common scheduling algorithms? How is thread scheduling different

### Real-Time Operating Systems

Real-Time Operating Systems 1 Summary Introduction Basic concepts RT Scheduling Aperiodic task scheduling Periodic task scheduling Embedded RTOS Source: G.Buttazzo, Hard Real-Time Computing Systems Predictable

### Scheduling Algorithm and Analysis

Scheduling Algorithm and Analysis EDF (Module 28) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Priority-Driven Scheduling of Periodic Tasks Why priority-driven scheduling

### Enhancing the Monitoring of Real-Time Performance in Linux

Master of Science Thesis Enhancing the Monitoring of Real-Time Performance in Linux Author: Nima Asadi nai10001@student.mdh.se Supervisor: Mehrdad Saadatmand mehrdad.saadatmand@mdh.se Examiner: Mikael

### Lecture 2 General Concepts of RTOS (Real-Time Operating System)

CENG 383 Real-Time Systems Lecture 2 General Concepts of RTOS (Real-Time Operating System) Asst. Prof. Tolga Ayav, Ph.D. Department of Computer Engineering Operating System Specialized collection of system

### Scheduling 0 : Levels. High level scheduling: Medium level scheduling: Low level scheduling

Scheduling 0 : Levels High level scheduling: Deciding whether another process can run is process table full? user process limit reached? load to swap space or memory? Medium level scheduling: Balancing

### Chapter 6: CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Operating System Concepts 6.1 Basic Concepts Maximum CPU utilization obtained with multiprogramming. CPU I/O Burst Cycle

### CPU Scheduling Yi Shi Fall 2015 Xi an Jiaotong University

CPU Scheduling Yi Shi Fall 2015 Xi an Jiaotong University Goals for Today CPU Schedulers Scheduling Algorithms Algorithm Evaluation Metrics Algorithm details Thread Scheduling Multiple-Processor Scheduling

### Commonly Used Approaches to Real-Time Scheduling

Integre Technical Publishing Co., Inc. Liu January 13, 2000 8:46 a.m. chap4 page 60 C H A P T E R 4 Commonly Used Approaches to Real-Time Scheduling This chapter provides a brief overview of three commonly

### Chapter 6: CPU Scheduling

1 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 2 Basic Concepts Maximum CPU utilization

### Resource Reservation & Resource Servers. Problems to solve

Resource Reservation & Resource Servers Problems to solve Hard-deadline tasks may be Periodic or Sporadic (with a known minimum arrival time) or Non periodic (how to deal with this?) Soft-deadline tasks

### Improvement of Scheduling Granularity for Deadline Scheduler

Improvement of Scheduling Granularity for Deadline Scheduler Yoshitake Kobayashi Advanced Software Technology Group Corporate Software Engineering Center TOSHIBA CORPORATION Copyright 2012, Toshiba Corporation.

### Chapter 5: CPU Scheduling. Operating System Concepts 7 th Edition, Jan 14, 2005

Chapter 5: CPU Scheduling Operating System Concepts 7 th Edition, Jan 14, 2005 Silberschatz, Galvin and Gagne 2005 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling

### CPU Scheduling. User/Kernel Threads. Mixed User/Kernel Threads. Solaris/Linux Threads. CS 256/456 Dept. of Computer Science, University of Rochester

CPU Scheduling CS 256/456 Dept. of Computer Science, University of Rochester User/Kernel Threads User threads Thread data structure is in user-mode memory scheduling/switching done at user mode Kernel

### RTOS Real-Time Operating Systems. Chenyang Lu

RTOS Real-Time Operating Systems Chenyang Lu OS Support for Real-Time Ø Real-Time OS Ø Real-time extensions to general-purpose OS Chenyang Lu 19 RTOS: Features for Efficiency Ø Small Ø Minimal set of functionality

### Real-Time Operating Systems. http://soc.eurecom.fr/os/

Institut Mines-Telecom Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ Outline 2/66 Fall 2014 Institut Mines-Telecom Definitions What is an Embedded

### Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

### Chapter 6: CPU Scheduling. Basic Concepts

1 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 Basic Concepts Maximum CPU utilization obtained

### Modular Real-Time Linux

Modular Real-Time Linux Shinpei Kato Department of Information and Computer Science, Keio University 3-14-1 Hiyoshi, Kohoku, Yokohama, Japan shinpei@ny.ics.keio.ac.jp Nobuyuki Yamasaki Department of Information

### Real-Time Architectures 2003/2004. Overview. Issues, questions of interest. Scheduling Analysis. Johan Lukkien

Real-Time Architectures 2003/2004 Scheduling Analysis Johan Lukkien 19-04-2004 1 Overview Algorithm and problem classes Simple, periodic taskset problem statement feasibility criteria utilization bound

### Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6 Winter Term 2008 / 2009 Jun.-Prof. Dr. André Brinkmann Andre.Brinkmann@uni-paderborn.de Universität Paderborn PC² Agenda Multiprocessor and