CS 5204 – Operating Systems 1 Scheduler Activations.

Slides:



Advertisements
Similar presentations
Concurrency Issues Motivation, Problems, Directions Dennis Kafura - CS Operating Systems1.
Advertisements

Scheduler Activations: Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
User-Level Interprocess Communication for Shared Memory Multiprocessors Bershad, B. N., Anderson, T. E., Lazowska, E.D., and Levy, H. M. Presented by Akbar.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
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
Modified from Silberschatz, Galvin and Gagne ©2009 Lecture 7 Chapter 4: Threads (cont)
Threads Irfan Khan Myo Thein What Are Threads ? a light, fine, string like length of material made up of two or more fibers or strands of spun cotton,
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
CS533 Concepts of Operating Systems Class 5 Integrated Task and Stack Management.
Chapter 5 Processes and Threads Copyright © 2008.
CS533 Concepts of Operating Systems Class 20 Summary.
SCHEDULER ACTIVATIONS Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska, Henry.
User Level Interprocess Communication for Shared Memory Multiprocessor by Bershad, B.N. Anderson, A.E., Lazowska, E.D., and Levy, H.M.
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
3.5 Interprocess Communication
CS533 Concepts of Operating Systems Class 7 Integrated Task and Stack Management.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 4 – Thread Concepts Outline 4.1 Introduction 4.2Definition of Thread 4.3Motivation for Threads.
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.
Inter-Process Communication  most OSs provide several abstractions for inter- process communication: message passing, shared memory, etc.  communication.
Scheduler Activations : Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska.
Process Concept An operating system executes a variety of programs
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
G Robert Grimm New York University Scheduler Activations.
Threads Chapter 4. Modern Process & Thread –Process is an infrastructure in which execution takes place  (address space + resources) –Thread is a program.
Scheduler Activations Jeff Chase. Threads in a Process Threads are useful at user-level – Parallelism, hide I/O latency, interactivity Option A (early.
CS533 Concepts of Operating Systems Class 9 Lightweight Remote Procedure Call (LRPC) Rizal Arryadi.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Threads, SMP, and Microkernels Chapter 4. 2 Outline n Threads n Symmetric Multiprocessing (SMP) n Microkernel n Linux Threads.
Threads, Thread management & Resource Management.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Scheduler Activations: Effective Kernel Support for the User- Level Management of Parallelism. Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 4 – Thread Concepts Outline 4.1 Introduction 4.2Definition of Thread 4.3Motivation for.
Scheduler Activations: Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CSE 60641: Operating Systems Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism. Thomas E. Anderson, Brian N.
Threads G.Anuradha (Reference : William Stallings)
Copyright ©: University of Illinois CS 241 Staff1 Threads Systems Concepts.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
CS333 Intro to Operating Systems Jonathan Walpole.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
ITFN 3601 Introduction to Operating Systems Lecture 3 Processes, Threads & Scheduling Intro.
CSE 451: Operating Systems Winter 2015 Module 5 1 / 2 User-Level Threads & Scheduler Activations Mark Zbikowski 476 Allen Center.
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy. Presented by: Tim Fleck.
Department of Computer Science and Software Engineering
Operating Systems: Internals and Design Principles
Processes & Threads Introduction to Operating Systems: Module 5.
Threads-Process Interaction. CONTENTS  Threads  Process interaction.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
CS533 Concepts of Operating Systems Jonathan Walpole.
Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E.
1 Threads, SMP, and Microkernels Chapter 4. 2 Process Resource ownership - process includes a virtual address space to hold the process image Scheduling/execution-
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
1 Chapter 5: Threads Overview Multithreading Models & Issues Read Chapter 5 pages
Jonas Johansson Summarizing presentation of Scheduler Activations – A different approach to parallelism.
Chapter 4: Multithreaded Programming
Threads.
Fast Communication and User Level Parallelism
Thomas E. Anderson, Brian N. Bershad,
CS510 Operating System Foundations
Operating System Overview
Threads.
CS Introduction to Operating Systems
Presentation transcript:

CS 5204 – Operating Systems 1 Scheduler Activations

Concurrency CS 5204 – Operating Systems2 Concurrent Processing How can concurrent processing activity be structured on a single processor? How can application-level information and system-level information be combined to provide efficient scheduling of processing activities?

Concurrency CS 5204 – Operating Systems3 Reasons for Concurrency multitasking parallelism performance coordination

Concurrency CS 5204 – Operating Systems4 Technologies Driving Concurrent Programming Intel: 80 core experimental system Intel: Quad Core Sun: 8 core chip

Concurrency CS 5204 – Operating Systems5 Synchronization Difficulty in controlling concurrency via blocking  Deadlock  Priority inversion  Convoying A variety of “correct” answers  Sequential consistency (Lamport): individual operations on a shared resource (e.g., memory).  Serializability: a group of operations (transaction) which may be interleaved with operations of another group (transaction) each operating on a shared resource (e.g., a database).  Linearizability (Herlihy, Wing): a group of operations (transaction) not interleaved with operations of another group (transaction) each operating on a shared object.

Concurrency CS 5204 – Operating Systems6 Context Support for concurrent and parallel programming conform to application semantics respect priorities of applications no unnecessary blocking fast context switch high processor utilization concurrent parallel functionality performance relative importance

Concurrency CS 5204 – Operating Systems7 “Heavyweight” Process Model... user kernel simple, uni-threaded model security provided by address space boundaries high cost for context switch coarse granularity limits degree of concurrency

Concurrency CS 5204 – Operating Systems8 “Lightweight” (User-level) Threads... user kernel thread semantics defined by application fast context switch time (within an order of magnitude of procedure call time) system scheduler unaware of user thread priorities unnecessary blocking (I/O, page faults, etc.) processor under-utilization

Concurrency CS 5204 – Operating Systems9 Kernel-level Threads thread semantics defined by system overhead incurred due to overly general implementation and cost of kernel traps for thread operations context switch time better than process switch time by an order of magnitude, but an order of magnitude worse than user-level threads system scheduler unaware of user thread state (e.g, in a critical region) leading to blocking and lower processor utilization... user kernel

Concurrency CS 5204 – Operating Systems10 Problem Application has knowledge of the user-level thread state but has little knowledge of or influence over critical kernel-level events (by design! to achieve the virtual machine abstraction) Kernel has inadequate knowledge of user-level thread state to make optimal scheduling decisions Solution: a mechanism that facilitates exchange of information between user-level and kernel-level mechanisms. A general system design problem: communicating information and control across layer boundaries while preserving the inherent advantages of layering, abstraction, and virtualization.

Concurrency CS 5204 – Operating Systems11 Scheduler Activations: Structure... kernel support user kernel change in processor allocation change in thread status Change in processor requirements thread library Scheduler activations

Concurrency CS 5204 – Operating Systems12 Communication via Upcalls The kernel-level scheduler activation mechanism communicates with the user-level thread library by a set of upcalls: Add this processor (processor #) Processor has been preempted (preempted activation #, machine state) Scheduler activation has blocked (blocked activation #) Scheduler activation has unblocked (unblocked activation #, machine state) The thread library must maintain the association between a thread’s identity and thread’s scheduler activation number.

Concurrency CS 5204 – Operating Systems13 Role of Scheduler Activations virtual multiprocessor user-level threads... P1 P2 Pn... SA kernel thread library Invariant: there is one running scheduler activation (SA) for each processor assigned to the user process. abstraction implementation

Concurrency CS 5204 – Operating Systems14 Avoiding Effects of Blocking user kernel user kernel 3: new Kernel threads Scheduler Activations 1: system call 2: block 1 2 4: upcall 5: start

Concurrency CS 5204 – Operating Systems15 Resuming Blocked Thread user kernel 2: preempt 1: unblock 3: upcall 5 4 4: preempt 5: resume

Concurrency CS 5204 – Operating Systems16 Performance Operation FastThreads on Topaz Threads FastThreads on Scheduler Activations Topaz ThreadsUltrix process Null fork Signal-Wait