Multiprocessor and Real- Time Scheduling. Chapter 10

Similar documents
Multiprocessor and Real-Time Scheduling. Chapter 10

ECE519 Advanced Operating Systems

Today s class. Scheduling. Informationsteknologi. Tuesday, October 9, 2007 Computer Systems/Operating Systems - Class 14 1

Multiprocessor scheduling

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

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

Module 20: Multi-core Computing Multi-processor Scheduling Lecture 39: Multi-processor Scheduling. The Lecture Contains: User Control.

LAST LECTURE ROUND-ROBIN 1 PRIORITIES. Performance of round-robin scheduling: Scheduling Algorithms: Slide 3. Slide 1. quantum=1:

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


Uniprocessor Scheduling. Aim of Scheduling

Uniprocessor Scheduling. Aim of Scheduling. Types of Scheduling. Long-Term Scheduling. Chapter 9. Response time Throughput Processor efficiency

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

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

8: Scheduling. Scheduling. Mark Handley

Computer Systems Assignment 4: Scheduling and I/O

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

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

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)

Course Syllabus. Operating Systems

Uniprocessor Scheduling. Chapter 9

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.

1.1 CPU I/O Burst Cycle

Announcements/Reminders

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

Chapter 5: CPU Scheduling

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

Example: CPU-bound process that would run for 100 quanta continuously 1, 2, 4, 8, 16, 32, 64 (only 37 required for last run) Needs only 7 swaps

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

Last Class: CPU Scheduling! Adjusting Priorities in MLFQ!

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

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

Last Class: Processes

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Unit 3 : Process Management

Operating Systems. Computer Science & Information Technology (CS) Rank under AIR 100

Process- Concept &Process Scheduling OPERATING SYSTEMS

SMD149 - Operating Systems

Uniprocessor Scheduling

1 Multiprocessors. 1.1 Kinds of Processes. COMP 242 Class Notes Section 9: Multiprocessor Operating Systems

Introduction to Real-Time Operating Systems

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

Real-time operating systems and scheduling

06-Dec-17. Credits:4. Notes by Pritee Parwekar,ANITS 06-Dec-17 1

Operating Systems. Scheduling

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

CS370 Operating Systems

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

Multiprocessor Systems. COMP s1

Operating System Review Part

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

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

Table of Contents 1. OPERATING SYSTEM OVERVIEW OPERATING SYSTEM TYPES OPERATING SYSTEM SERVICES Definition...

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

Cs703 Current Midterm papers solved by Naina_Mailk. Q: 1 what are the Characteristics of Real-Time Operating system?

Motivation. Threads. Multithreaded Server Architecture. Thread of execution. Chapter 4

QUESTION BANK UNIT I

Chapter 9 Uniprocessor Scheduling

CS 153 Design of Operating Systems Winter 2016

CHAPTER 2: PROCESS MANAGEMENT

Scheduling of processes

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Operating Systems ECE344. Ding Yuan

UNIT:2. Process Management

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

Scheduling Algorithm and Analysis

Operating System Concepts Ch. 5: Scheduling

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009

Midterm Exam. October 20th, Thursday NSC

For use by students enrolled in #71251 CSE430 Fall 2012 at Arizona State University. Do not use if not enrolled.

Frequently asked questions from the previous class survey

CSCE Operating Systems Scheduling. Qiang Zeng, Ph.D. Fall 2018

OPERATING SYSTEMS. UNIT II Sections A, B & D. An operating system executes a variety of programs:

Multimedia Systems 2011/2012

Multiprocessor System. Multiprocessor Systems. Bus Based UMA. Types of Multiprocessors (MPs) Cache Consistency. Bus Based UMA. Chapter 8, 8.

CSE 120. Fall Lecture 8: Scheduling and Deadlock. Keith Marzullo

Process Scheduling. Copyright : University of Illinois CS 241 Staff

CSE 120 Principles of Operating Systems

LECTURE 3:CPU SCHEDULING

Student Name:.. Student ID... Course Code: CSC 227 Course Title: Semester: Fall Exercises Cover Sheet:

COSC243 Part 2: Operating Systems

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

Systemy RT i embedded Wykład 11 Systemy RTOS

Operating Systems. Figure: Process States. 1 P a g e

Operating System - Overview

Scheduling. The Basics

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!!

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

UNIT 1 JAGANNATH UNIVERSITY UNIT 2. Define Operating system and its functions. Explain different types of Operating System

Microkernel/OS and Real-Time Scheduling

Scheduling. Scheduling 1/51

CSE 120 Principles of Operating Systems Spring 2017

Tasks. Task Implementation and management

Main Points of the Computer Organization and System Software Module

SMD149 - Operating Systems - Multiprocessing

Overview. SMD149 - Operating Systems - Multiprocessing. Multiprocessing architecture. Introduction SISD. Flynn s taxonomy

Transcription:

Multiprocessor and Real- Time Scheduling Chapter 10

Classifications of Multiprocessor Loosely coupled multiprocessor 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

Independent Parallelism Separate processes running No synchronization Example is time sharing average response time to users is less

Very Coarse Parallelism Distributed processing across network nodes to form a single computing environment Good when the interaction among processes is infrequent overhead of network would slow down communications

Coarse Parallelism Similar to running many processes on one processor except it is spread to more processors Multiprocessing

Medium Parallelism Parallel processing or multitasking within a single application Single application is a collection of threads Threads usually interact frequently

Process Scheduling Single queue for all processes Multiple queues are used for priorities All queues feed to the common pool of processors Specific scheduling disciplines are less important with more than one processor

Threads Each thread executes separately from the rest of the process An application can be a set of threads that cooperate and execute concurrently in the same address space Running each thread on a separate processor yields a dramatic gain in performance

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

Multiprocessor Thread Scheduling Dedicated processor assignment threads are assigned to a specific processor Dynamic scheduling number of threads can be altered during the course of execution

Load Sharing Load is distributed evenly across the processors Assures no processor is idle No centralized scheduler required Use global queues Uniprocessor scheduling directly applies to this case The most common method

Disadvantages of Load Sharing Central queue needs mutual exclusion may be a bottleneck when more than one processor looks for work at the same time With global queue, preempted threads are unlikely to resume execution on the same processor hence local processor cache use is less efficient If all threads are in the global queue, eligible threads cannot gain access to the idle processors at the same time

Gang Scheduling Simultaneous scheduling of threads that make up a single process; assignment of threads to processors kept until preempted Useful for applications where performance severely degrades when any part of the application is not running Rationale: threads often need to synchronize with each other

Dedicated Processor Assignment When application is scheduled, its threads are assigned to a processor for the duration of application s execution Disadvantage: Some processors may be idle Advantage: Avoids process switching

Dynamic Scheduling Number of threads in a process changes dynamically (by the application) Operating system adjusts the processor load using some of these strategies: assign idle processors to new threads new arrivals may be assigned to a processor by taking away a processor from some other application that uses > 1 processor hold request until processor is available new arrivals may be given a processor before existing running applications

Real-Time Systems 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 processes must keep up with them

Real-Time Systems Control of laboratory experiments Process control plants Robotics Air traffic control Telecommunications

Characteristics of Real- Time Operating Systems Correctness depends not only on the result produced by computation, but also by the timing and deadlines Deterministic operations are performed at fixed, predetermined times or within predetermined time intervals concerned with how long the operating system delays before acknowledging an interrupt

Characteristics of Real- Time Operating Systems 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

Characteristics of Real- Time Operating Systems User control specify paging what processes must always reside in main memory rights of processes

Characteristics of Real- Time Operating Systems Reliability degradation of performance may have catastrophic consequences most critical, high priority tasks execute

Features of Real-Time Operating Systems Fast context switch Small size Ability to respond to external interrupts quickly Multitasking with interprocess communication tools such as semaphores, signals, and events Files that accumulate data at a fast rate

Features of Real-Time Operating Systems Preemptive scheduling based on priority immediate preemption allows operating system to respond to an interrupt quickly Minimization of intervals during which interrupts are disabled Delay tasks for fixed amount of time Special alarms and timeouts

Real-Time Scheduling Static table-driven determines statically what the schedule should be; the schedule tells which tasks to dispatch and when Static priority-driven preemptive traditional priority-driven scheduler is used Dynamic planning-based Like static, but schedules are periodically recomputed Dynamic best effort No analysis: OS tries to execute each job before its deadline; a job is aborted, if its deadline is not met

Deadline Scheduling Real-time applications are not concerned with speed but with completing tasks Scheduling tasks with the earliest deadline minimized the fraction of tasks that miss their deadlines includes new tasks and amount of time needed for existing tasks

Scheduling of Real-Time Tasks 0 10 20 30 40 50 60 70 80 90 100 110 120 Arrival times A B C D E Requirements Starting deadline B C E D A Arrival times A B C D E Earliest deadline Service A C E D Starting deadline B (missed) C E D A A starts because there is no other job. B misses its deadline

Scheduling of Real-Time Tasks 0 10 20 30 40 50 60 70 80 90 100 110 120 Arrival times A B C D E Requirements Starting deadline B C E D A Earliest deadline with unforced idle times Arrival times Service Starting deadline A B B C D E B C E D C E D A

Scheduling of Real-Time Tasks 0 10 20 30 40 50 60 70 80 90 100 110 120 Arrival times A B C D E Requirements Starting deadline B C E D A Arrival times A B C D E First-come first-served (FCFS) Service Starting deadline B A C D (missed) C E (missed) D A

UNIX System V Release 4 Scheduling Set of 160 priority levels divided into three priority classes, each with its queue Basic kernel is not preemptive; split with preemption points to improve processing Priority Class Real-time Kernel Global Value.. 159 100 99. 60 59. Time-. shared 0 Scheduling Sequence first last

Windows NT Priority Relationship 2 bands of priorities: 0-15 variable, 16-31 real-time. Priorities are fixed in the real-time band Uses round-robin within each priority level. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 base priority highest above normal normal below normal lowest Thread s dynamic priority goes up, if thread is interrupted for I/O. It goes down if thread hogs CPU Process Priority Thread s Base Priority Thread s Dynamic Priority