Copyright © 1995-2002 Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture notes Dr.

Slides:



Advertisements
Similar presentations
Multiple Processor Systems
Advertisements

Threads, SMP, and Microkernels
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Computer Systems/Operating Systems - Class 8
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
6/9/2015B.Ramamurthy1 Process Description and Control B.Ramamurthy.
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
Understanding Operating Systems 1 Overview Introduction Operating System Components Machine Hardware Types of Operating Systems Brief History of Operating.
Figure 1.1 Interaction between applications and the operating system.
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Distributed Systems Shahab Baqai Lahore University.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Computer System Architectures Computer System Software
Self stabilizing Linux Kernel Mechanism Doron Mishali, Alex Plits Supervisors: Prof. Shlomi Dolev Dr. Reuven Yagel.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
B.Ramamurthy9/19/20151 Operating Systems u Bina Ramamurthy CS421.
 Introduction to Operating System Introduction to Operating System  Types Of An Operating System Types Of An Operating System  Single User Single User.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
المحاضرة الاولى Operating Systems. The general objectives of this decision explain the concepts and the importance of operating systems and development.
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Operating Systems CSE 411 Multi-processor Operating Systems Multi-processor Operating Systems Dec Lecture 30 Instructor: Bhuvan Urgaonkar.
5 May CmpE 516 Fault Tolerant Scheduling in Multiprocessor Systems Betül Demiröz.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Distributed System Concepts and Architectures Services
Distributed System Services Fall 2008 Siva Josyula
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
Operating Systems: Internals and Design Principles
Lecture 4 Page 1 CS 111 Online Modularity and Virtualization CS 111 On-Line MS Program Operating Systems Peter Reiher.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
Copyright © Clifford Neuman and Dongho Kim - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture.
Background Computer System Architectures Computer System Software.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
Lecture 13 Parallel Processing. 2 What is Parallel Computing? Traditionally software has been written for serial computation. Parallel computing is the.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
Introduction to Operating Systems Concepts
Advanced OS Concepts (For OCR)
OPERATING SYSTEMS CS3502 Fall 2017
Uniprocessor Scheduling
Advanced Operating Systems Lecture notes
Chapter 1: Introduction
Real-time Software Design
Threads, SMP, and Microkernels
Operating Systems Bina Ramamurthy CSE421 11/27/2018 B.Ramamurthy.
Process & its States Lecture 5.
Advanced Operating Systems Lecture notes
Process Description and Control
Lecture 4- Threads, SMP, and Microkernels
Threads Chapter 4.
Process Description and Control
Process Description and Control
Process Description and Control
Process Description and Control
Process Description and Control
Thomas E. Anderson, Brian N. Bershad,
CS510 Operating System Foundations
Chapter 2 Operating System Overview
Operating System Overview
Presentation transcript:

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advanced Operating Systems Lecture notes Dr. Clifford Neuman Dr. Dongho Kim University of Southern California Information Sciences Institute

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE CSci555: Advanced Operating Systems Lecture 12 - November 14,15, 2002 Scheduling, Real-Time, Fault Tolerance (slides by Dr. Neuman) Dr. Clifford Neuman Dr. Dongho Kim University of Southern California Information Sciences Institute

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Scheduling and Real-Time systems Scheduling –Allocation of resources at a particular point in time to jobs needing those resources, usually according to a defined policy. Focus –We will focus primarily on the scheduling of processing resources, though similar concepts apply the the scheduling of other resources including network bandwidth, memory, and special devices.

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Parallel Computing - General Issues Speedup - the final measure of success –Parallelism vs Concurrency ▪Actual vs possible by application –Granularity ▪Size of the concurrent tasks ▪Reconfigurability –Number of processors –Communication cost –Preemption v. non-preemption –Co-scheduling ▪Some things better scheduled together

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Shared Memory Multi-Processing Includes use of distributed shared memory, and shared memory multi-processors Processors usually tightly coupled to memory, often on a shared bus. Programs communicated through shared memory locations. For SMPs cache consistency is the important issue. In DSM it is memory coherence. –One level higher in the storage hierarchy Examples ▪Sequent, Encore Multimax, DEC Firefly, Stanford DASH

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Where is the best place for scheduling Application is in best position to know its own specific scheduling requirements –Which threads run best simultaneously –Which are on Critical path –But Kernel must make sure all play fairly MACH Scheduling –Lets process provide hints to discourage running –Possible to hand off processor to another thread ▪Makes easier for Kernel to select next thread ▪Allow interleaving of concurrent threads –Leaves low level scheduling in Kernel –Based on higher level info from application space

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Scheduler activations User level scheduling of threads –Application maintains scheduling queue Kernel allocates threads to tasks –Makes upcall to scheduling code in application when thread is blocked for I/O or preempted –Only user level involved if blocked for critical section User level will block on kernel calls –Kernel returns control to application scheduler

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Distributed-Memory Multi-Processing Processors coupled to only part of the memory –Direct access only to their own memory Processors interconnected in mesh or network –Multiple hops may be necessary May support multiple threads per task Typical characteristics –Higher communication costs –Large number of processors –Coarser granularity of tasks Message passing for communication

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Prospero Resource Manager Prospero Resource Manager - 3 entities One or more system managers –Each manages subset of resources –Allocates resources to jobs as needed A job manager associated with each job –Identifies resource requirements of the job –Acquires resources from one or more system managers –Allocates resources to the job’s tasks A Node manager on each node –Mediates access to the nodes resources

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE The Prospero Resource Manager A) User invokes an application program on his workstation. b) The program begins executing on a set of nodes. Tasks perform terminal and file I/O on the user’s workstation. % appl User’s workstation Filesystem file1 file2 Node T2 NodeT3 T1 Terminal I/O Read stdin, Write stdout, stderr Read file Filesystem file1 file2 Write file

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Advantages of the PRM Scalability –System manager does not require detailed job information –Multiple system managers Job manager selected for application –Knows more about job’s needs than the system manager –Alternate job managers useful for debugging, performance tuning Abstraction –Job manager provides a single resource allocator for the job’s tasks –Single system model

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Real time Systems Issues are scheduling and interrupts –Must complete task by a particular deadline –Examples: ▪Accepting input from real time sensors ▪Process control applications ▪Responding to environmental events How does one support real time systems –If short deadline, often use a dedicated system –Give real time tasks absolute priority –Do not support virtual memory ▪Use early binding

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Real time Scheduling To initiate, must specify –Deadline –Estimate/upper-bound on resources System accepts or rejects –If accepted, agrees that it can meet the deadline –Places job in calendar, blocking out the resources it will need and planning when the resources will be allocated Some systems support priorities –But this can violate the RT assumption for already accepted jobs

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Fault-Tolerant systems Failure probabilities –Hierarchical, based on lower level probabilities –Failure Trees –Add probabilities where any failure affects you –Really (1 - ((1 - lambda)(1 -lambda)(1 - lambda))) –Multiply probabilities if all must break ▪Since numbers are small, this reduces failure rate –Both failure and repair rate are important

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Making systems fault tolerant Involves masking failure at higher laters –Redundancy –Error correcting codes –Error detection Techniques –In hardware –Groups of servers or processors execute in parallel and provide hot backups Space Shuttle Computer Systems exampls RAID example

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Types of failures Fail stop –Signals exception, or detectably does not work Returns wrong results –Must decide which component failed Byzantine –Reports difficult results to different participants –Intentional attacks may take this form

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE Recovery Repair of modules must be considered –Repair time estimates Reconfiguration –Allows one to run with diminished capacity –Improves fault tolerance (from catastrophic failure)

Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE OS Support for Databases Example of OS used for particular applications End-to-end argument for applications –Much of the common services in OS’s are optimized for general applications. –For DBMS applications, the DBMS might be in a better position to provide the services ▪Caching, Consistency, failure protection