Chapter 10 Multiprocessor and Real-Time Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Multiple Processor Systems
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Real Time Scheduling.
1 Multiprocessor and Real-Time Scheduling Chapter 10.
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.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
1 Multiprocessor and Real-Time Scheduling Chapter 10.
1 Multiprocessor and Real-Time Scheduling Chapter 10.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
Tao Yang, UCSB CS 240B’03 Unix Scheduling Multilevel feedback queues –128 priority queues (value: 0-127) –Round Robin per priority queue Every scheduling.
Multiprocessor and Real-Time Scheduling Chapter 10.
Chapter 11 Operating Systems
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
1 Scheduling in Representative Operating Systems.
1 Uniprocessor Scheduling Chapter 9. 2 Aims of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
Informationsteknologi Tuesday, October 9, 2007Computer Systems/Operating Systems - Class 141 Today’s class Scheduling.
Chapter 10 Multiprocessor and Real-Time Scheduling
Multiprocessor and Real-Time Scheduling
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Main Job: Assign processes to be executed by the processor(s) and processes to be loaded in main.
Operating System 10 MULTIPROCESSOR AND REAL-TIME SCHEDULING
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
Chapter 9 Uniprocessor Scheduling Spring, 2011 School of Computer Science & Engineering Chung-Ang University.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
IT320 OPERATING SYSTEM CONCEPTS Unit 6: Processor Scheduling September 2012 Kaplan University 1.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Chapter 10 Multiprocessor and Real-Time Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Page 1 2P13 Week 9. Page 2 Table 9.2 Scheduling Criteria User Oriented, Performance Related Turnaround time This is the interval of time between the submission.
Multiprocessor and Real-Time Scheduling Chapter 10.
Multiprocessor and Real-Time Scheduling
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
1 Multiprocessor and Real-Time Scheduling Chapter 10 Real-Time scheduling will be covered in SYSC3303.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Minimize response time Maximize throughput Maximize processor efficiency.
1 Multiprocessor Scheduling Module 3.1 For a good summary on multiprocessor and real-time scheduling, visit:
ICOM Noack Scheduling For Distributed Systems Classification – degree of coupling Classification – granularity Local vs centralized scheduling Methods.
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Response time Throughput Processor efficiency.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Response time Throughput Processor efficiency.
Uniprocessor Scheduling
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
Real time scheduling G.Anuradha Ref:- Stallings. Real time computing Correctness of the system depends not only on the logical result of computation,
Introduction to Embedded Systems Rabie A. Ramadan 5.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
For a good summary, visit:
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Principles of Operating Systems Lecture 16 Abhishek Dubey Daniel Balasubramanian Real Time Scheduling Fall 2014.
Multiprocessor, Multicore, and Real-Time Scheduling Chapter 10
Process Management Process Concept Why only the global variables?
Chapter 2 Scheduling.
Real-time Software Design
OverView of Scheduling
Operating System Chapter 9. Multiprocessor and Real Time Scheduling
Chapter 9 Uniprocessor Scheduling
Multiprocessor and Real-Time Scheduling
Operating System 10 MULTIPROCESSOR AND REAL-TIME SCHEDULING
CS703 – Advanced Operating Systems
Chapter 10 Multiprocessor and Real-Time Scheduling
CS703 - Advanced Operating Systems
CS703 - Advanced Operating Systems
Presentation transcript:

Chapter 10 Multiprocessor and Real-Time Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall

Classifications of Multiprocessor Systems Loosely coupled or distributed multiprocessor, or cluster –Each processor has its own memory and I/O channels Functionally specialized processors –Such as I/O processor –Controlled by a master processor Tightly coupled multiprocessing –Processors share main memory –Controlled by operating system

Parallelism Granularity Independent –Separate application or job –No synchronization among processes –Example is time-sharing system Coarse and Very Coarse-Grained Parallelism –Synchronization among processes at a very gross level –Good for concurrent processes on a multiprogrammed uniprocessor –Can by supported on a multiprocessor with little change Medium-Grained Parallelism –Single application is a collection of threads –Threads usually interact frequently Fine-Grained Parallelism –Highly parallel applications –Specialized and fragmented area

Thread Structure for Rendering Module

Scheduling Design Issues 1.Assignment of processes to processors 2.Use of multiprogramming on individual processors 3.Actual dispatching of a process

Assignment of Processes to Processors Treat processors as a pooled resource and assign process to processors on demand Permanently assign process to a processor –Known as group or gang scheduling –Dedicate short-term queue for each processor –Less overhead –Processor could be idle while another processor has a backlog

Assignment of Processes to Processors Global queue –Schedule to any available processor P1 P3 P2 P4 QUEUE

Assignment of Processes to Processors Master/slave architecture –Key kernel functions always run on a particular processor –Master is responsible for scheduling –Slave sends service request to the master –Disadvantages Failure of master brings down whole system Master can become a performance bottleneck

Assignment of Processes to Processors Peer architecture –Kernel can execute on any processor –Each processor does self-scheduling –Complicates the operating system Make sure two processors do not choose the same process Make sure there a no processes lost in queue Resolve & synchronize resources’ competition

Synchronization Granularity and Processes

Multiprogramming on Individual Processors Utilization vs Better Performance Best Performance when threads are able to run simultaneously Processs scheduling in multiprocessor: –Is feedback prioritization effective? –Or FCFS with less overhead?

Process Dispatch: Process Scheduling Single queue for all processes Multiple queues are used for priorities All queues feed to the common pool of processors

Comparison One and Two Processors

Thread Scheduling Execution is separated from the rest of the process An application can be a set of threads that cooperate and execute concurrently in the same address space Performance = F( degree of paralellism, thread management and scheduling)

Multiprocessor Thread Scheduling Load sharing –Processes are not assigned to a particular processor Gang scheduling –A set of related threads is scheduled to run on a set of processors at the same time Dedicated processor assignment –Threads are assigned to a specific processor Dynamic scheduling –Number of threads can be altered during course of execution

Load Sharing Load is distributed evenly across the processors No centralized scheduler required Use global queues including priority-based and feedback schemes Versions of Load sharing: –FCFS –Smallest number of threads first –Preemptive smallest number of thread first

Disadvantages of Load Sharing Central queue needs mutual exclusion Preemptive threads are unlikely resume execution on the same processor (inefficient cache in processor) If all threads are in the global queue, all threads of a program will not gain access to the processors at the same time

Gang Scheduling Simultaneous scheduling of threads that make up a single process Useful for applications where performance severely degrades when any part of the application is not running Threads often need to synchronize with each other

Example Scheduling Groups

Dedicated Processor Assignment When application is scheduled, its threads are assigned to a processor Some processors may be idle No multiprogramming of processors –No need since performance & effectiveness does not rely on this issue any more –Skip process switching speedup

Application Speedup

Dynamic Scheduling Number of threads in a process are altered dynamically by the application Operating system adjust the load to improve utilization –Assign idle processors –New arrivals may be assigned to a processor that is used by a job currently using more than one processor –Hold request until processor is available –Assign processor a job in the list that currently has no processors (i.e., to all waiting new arrivals)

Real-Time Scheduling Correctness of the system depends not only on the logical result of the computation but also on the time at which the results are produced Tasks or processes attempt to control or react to events that take place in the outside world These events occur in “real time” and tasks must be able to keep up with them

Real-Time Systems Control of laboratory experiments Process control in industrial plants Robotics Air traffic control Telecommunications Military command and control systems

Characteristics Determinism –Operations are performed at fixed, predetermined times or within predetermined time intervals –Concerned with how long the operating system delays before acknowledging an interrupt and there is sufficient capacity to handle all the requests within the required time

Characteristics Responsiveness –How long, after acknowledgment, it takes the operating system to service the interrupt –Includes amount of time to begin execution of the interrupt –Includes the amount of time to perform the interrupt –Effect of interrupt nesting

Characteristics User control –User specifies priority –Specify paging –What processes must always reside in main memory –Disks transfer algorithms to use –Rights of processes

Characteristics Reliability –Degradation of performance may have catastrophic consequences Fail-soft operation –Ability of a system to fail in such a way as to preserve as much capability and data as possible

Features of Real-Time OS 1.Fast process or thread switch 2.Small size 3.Ability to respond to external interrupts quickly 4.Multitasking with interprocess communication tools such as semaphores, signals, and events

Features of Real-Time OS 5.Use of special sequential files that can accumulate data at a fast rate 6.Preemptive scheduling base on priority 7.Minimization of intervals during which interrupts are disabled 8.Delay tasks for fixed amount of time 9.Special alarms and timeouts

Scheduling of Real-Time Process

Real-Time Scheduling Static table-driven –Determines at run time when a task begins execution Static priority-driven preemptive –Traditional priority-driven scheduler is used Dynamic planning-based –Feasibility determined at run time Dynamic best effort –No feasibility analysis is performed –Try to meet deadlines and abort those who missed

Deadline Scheduling Real-time applications are not concerned with speed but with completing tasks Information used –Ready time –Starting deadline –Completion deadline –Processing time –Resource requirements –Priority –Subtask scheduler

Two Tasks Deadline period Processing Time A20 ms10 ms B50 ms25 ms

Scheduling

Execution Profile

Scheduling

Rate Monotonic Scheduling Assigns priorities to tasks on the basis of their periods Highest-priority task is the one with the shortest period

Task Set

Periodic Task Timing Diagram

Priority Inversion Can occur in any priority-based preemptive scheduling scheme Occurs when circumstances within the system force a higher priority task to wait for a lower priority task

Unbounded Priority Inversion Duration of a priority inversion depends on unpredictable actions of other unrelated tasks

Priority Inheritance Lower-priority task inherits the priority of any higher priority task pending on a resource they share