1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.

Slides:



Advertisements
Similar presentations
CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
Advertisements

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.
Java How to Program, 9/e CET 3640 Professor: Dr. José M. Reyes Álamo © Copyright by Pearson Education, Inc. All Rights Reserved.
Ceng Operating Systems Chapter 2.2 : Process Scheduling Process concept  Process scheduling Interprocess communication Deadlocks Threads.
Chapter 3: CPU Scheduling
Cs238 CPU Scheduling Dr. Alan R. Davis.
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
Supporting Time-sensitive Application on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presented by Wen Sun Some Slides.
Cs238 CPU Scheduling Dr. Alan R. Davis. CPU Scheduling The objective of multiprogramming is to have some process running at all times, to maximize CPU.
Supporting Time-sensitive Application on a Commodity OS By Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presenter: Shuping Tien.
1 Traditional OSes with Soft Real- Time Scheduling Module 3.3 For a good summary, visit:
Chapter 11 Operating Systems
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
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.
CPU Scheduling Basic Concepts Scheduling Criteria
Chapter 3 Overview of Operating Systems Copyright © 2008.
Chapter 19: Real-Time Systems
Lecture 5: CPU Scheduling. Lecture 5 / Page 2AE4B33OSS Silberschatz, Galvin and Gagne ©2005 Contents Why CPU Scheduling Scheduling Criteria & Optimization.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
Chapter 19: Real-Time Systems Silberschatz, Galvin and Gagne ©2005 AE4B33OSS Chapter 19: Real-Time Systems System Characteristics Features of Real-Time.
Java How to Program, 9/e CET 3640 Professor: Dr. Reyes Álamo © Copyright by Pearson Education, Inc. All Rights Reserved.
Introduction to Embedded Systems
 Scheduling  Linux Scheduling  Linux Scheduling Policy  Classification Of Processes In Linux  Linux Scheduling Classes  Process States In Linux.
Chapter 6: CPU Scheduling
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
Uniprocessor Scheduling
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
Chapter 6 CPU SCHEDULING.
1 Previous lecture review n Out of basic scheduling techniques none is a clear winner: u FCFS - simple but unfair u RR - more overhead than FCFS may not.
Dr. M. Munlin Real-Time and Multimedia Systems 1 NETE0516 Operating Systems Instructor: ผ. ศ. ดร. หมัดอามีน หมัน หลิน Faculty of Information Science and.
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
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.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
Real Time Scheduling Telvis Calhoun CSc Outline Introduction Real-Time Scheduling Overview Tasks, Jobs and Schedules Rate/Deadline Monotonic Deferrable.
What Every Developer Should Know about the Kernel Dr. Michael L. Collard 1.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 15 Scheduling Read Ch.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Operating Systems Scheduling. Bursts of CPU usage alternate with periods of waiting for I/O. (a) A CPU-bound process. (b) An I/O-bound process. Scheduling.
RTOS task scheduling models
BY: ADAM BAIR Real-Time Operating Systems. What’s a Real-Time System? - A computer system that requires computation to be correct and done before a specified.
Introduction to Embedded Systems Rabie A. Ramadan 5.
Click to edit Master subtitle style Chapter 19 Real-Time Systems CS 540 Advanced Operating systems Instructor: Dr. Behzad Perviz Fall 2010 Presented By:
19.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 19: Real-Time Systems.
Chapter 19: Real-Time Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 19: Real-Time Systems System Characteristics.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
Purpose of Operating System Part 2 Monil Adhikari.
Chapter 19 Real-Time Systems CS 540 Advanced Operating systems Instructor: Dr. Behzad Perviz Fall 2010 Presented By: Monali Bhavsar Amee Joshi.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling CSCI Introduction By switching the CPU among processes, the O.S. can make the system more productive –Some process is running at.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Scheduling.
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.
REAL-TIME OPERATING SYSTEMS
Chapter 19: Real-Time Systems
Chapter 6: CPU Scheduling
Lecture 12: Real-Time Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 2: The Linux System Part 3
CPU SCHEDULING.
Threads Chapter 4.
Chapter 19: Real-Time Systems
Chapter 10 Multiprocessor and Real-Time Scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Presentation transcript:

1

 System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x 2

 To explain the timing requirements of real-time systems  To distinguish between hard and soft real-time systems  To discuss the defining characteristics of real-time systems  To describe scheduling algorithms for hard real- time systems 3

 A real-time system requires that results be produced within a specified deadline period  An embedded system is a computing device that is part of a larger system (I.e. automobile, airliner)  A safety-critical system is a real-time system with catastrophic results in case of failure 4

 A hard real-time system guarantees that real-time tasks be completed within their required deadlines  A soft real-time system provides priority of real- time tasks over non real-time tasks 5

 Single purpose  Small size  Inexpensively mass-produced  Specific timing requirements 6

7

 Many real-time systems are designed using system-on-a-chip (SOC) strategy  SOC allows the CPU, memory, memory- management unit, and attached peripheral ports (I.e. USB) to be contained in a single integrated circuit. 8

 Most real-time systems do not provide the features found in a standard desktop system  Reasons include: ◦ Real-time systems are typically single-purpose ◦ Real-time systems often do not require interfacing with a user ◦ Features found in a desktop PC require more substantial hardware that what is typically available in a real-time system ◦ Real-Time systems should be economically practical 9

 Address translation may occur via: 1.Real-addressing mode where programs generate actual addresses 2. Relocation register mode 3.Implementing full virtual memory 10

11

12

13

 In general, real-time operating systems must provide: 1. Preemptive, priority-based scheduling 2. Preemptive kernels 3. Latency must be minimized 14

 Priority-based scheduling algorithms assign each process a priority based on its importance.  Most important tasks are assigned higher priority than those deemed less important.  By supporting preemption, a process currently running on the CPU will be preempted if a higher- priority process become available to run. 15

Two Strategies to make a kernel preemptive:  Insert preemption points in long-duration system calls.  Synchronization mechanisms Any kernel data being updated are protected from modification by higher-priority process 16

Event latency is the amount of time from when an event occurs to when it is serviced. 17

Two types of latencies affect the performance of real-time systems:  Interrupt latency  Dispatch latency 18

Interrupt latency is the period of time from when an interrupt arrives at the CPU to when it is serviced 19

Dispatch latency is the amount of time required for the scheduler to stop one process and start another 20

 Issue: A higher-priority process needs to read or modify kernel data that are currently used by lower-priority process. ◦ Kernel data are typically protected with a lock.  Example: we have 3 process, L, M and H. ◦ Their priorities follow the order L < M < H. ◦ Process H requires resource R, which is currently being used by L. ◦ H has to wait for L to finish using resource R. ◦ M become runnable and preempting process L. 21

All process that are accessing the resources needed by higher-priority process inherits the higher priority until they are finished with the resources.  Example: ◦ Priority-Inheritance protocol allows L to temporarily inherit the priority of process H. ◦ M can’t preemption the execution of L. ◦ When L finishes using resource R, its priority set to the original one. ◦ Resource R is available, process H not M will run next. 22

 Periodic processes require the CPU at specified intervals (periods)  p is the duration of the period  d is the deadline by when the process must be serviced  t is the processing time 23

24 Assume 2 process, and. The periods are: = 50 and = 100. The processing times are: = 20 and = 35 The deadline for each process requires that it complete its CPU burst by the start of its next period.

 A priority is assigned based on the inverse of its period  Shorter periods = higher priority;  Longer periods = lower priority  P1is assigned a higher priority than P2. 25

26 Assume 2 process, and. The periods are: = 50 and = 80. The processing times are: = 25 and = 35

 Priorities are assigned according to deadlines: 1.the earlier the deadline, the higher the priority 2.the later the deadline, the lower the priority 27

 T shares are allocated among all processes in the system  An application receives N shares where N < T  This ensures each application will receive N / T of the total processor time 28

Example:  Assume that a total of T = 100 shares is to be divided among three processes A, B and C.  A is assigned 50 shares, B is assigned 15 shares and C is assigned 20 shares. Admission control policy guarantees that an application receives its allocated shares of time. 29

 The Pthread API provides functions for managing real-time threads  Pthreads defines two scheduling classes for real-time threads: 1. SCHED_FIFO -threads are scheduled using a FCFS strategy with a FIFO queue. There is no time- slicing for threads of equal priority 2. SCHED_RR -similar to SCHED_FIFO except time- slicing occurs for threads of equal priority 30

31

 The Wind microkernel provides support for the following: 1.Processes and threads 2.preemptive and non-preemptive round-robin scheduling 3. manages interrupts (with bounded interrupt and dispatch latency times) 4.shared memory and message passing inter process communication facilities 32

33