CSE 542: Operating Systems

Slides:



Advertisements
Similar presentations
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Advertisements

Scheduler Activations: Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
Chapter 3 Process Description and Control
CS 5204 – Operating Systems 1 Scheduler Activations.
Lightweight Remote Procedure Call BRIAN N. BERSHAD THOMAS E. ANDERSON EDWARD D. LAZOWSKA HENRY M. LEVY Presented by Wen Sun.
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
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.
SCHEDULER ACTIVATIONS Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska, Henry.
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
Threads vs. Processes April 7, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, Henry M. Levy ACM Transactions Vol. 8, No. 1, February 1990,
USER LEVEL INTERPROCESS COMMUNICATION FOR SHARED MEMORY MULTIPROCESSORS Presented by Elakkiya Pandian CS 533 OPERATING SYSTEMS – SPRING 2011 Brian N. Bershad.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
1 Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska and Henry M. Levy Presented by: Karthika Kothapally.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism by Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
Scheduler Activations: Effective Kernel Support for the User- Level Management of Parallelism. Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
Scheduler Activations: Effective Kernel Support for the User-level Management of Parallelism Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
The Performance of Microkernel-Based Systems
Lightweight Remote Procedure Call BRIAN N. BERSHAD, THOMAS E. ANDERSON, EDWARD D. LASOWSKA, AND HENRY M. LEVY UNIVERSTY OF WASHINGTON "Lightweight Remote.
CSE 60641: Operating Systems Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism. Thomas E. Anderson, Brian N.
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.
Operating Systems CSE 411 CPU Management Sept Lecture 10 Instructor: Bhuvan Urgaonkar.
Review °Apply Principle of Locality Recursively °Manage memory to disk? Treat as cache Included protection as bonus, now critical Use Page Table of mappings.
Department of Computer Science and Software Engineering
Operating Systems: Internals and Design Principles
Brian Bershad, Thomas Anderson, Edward Lazowska, and Henry Levy Presented by: Byron Marohn Published: 1991.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
Processes Chapter 3. Processes in Distributed Systems Processes and threads –Introduction to threads –Distinction between threads and processes 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.
Introduction to Operating Systems Concepts
Virtual Memory Chapter 7.4.
The Mach Operating System
Protection and OS Structure
CS 6560: Operating Systems Design
Scheduler activations
Networks and Operating Systems: Exercise Session 2
Presentation by Omar Abu-Azzah
Morgan Kaufmann Publishers
B. N. Bershad, T. E. Anderson, E. D. Lazowska and H. M
Introduction to Operating Systems
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Scheduler Activations
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
CSE 451: Operating Systems Autumn 2003 Lecture 5 Threads
Fast Communication and User Level Parallelism
CSE 60641: Operating Systems
CPU scheduling decisions may take place when a process:
CSE451 - Section 10.
CSE 451: Operating Systems Winter 2003 Lecture 5 Threads
Presented by Neha Agrawal
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Thomas E. Anderson, Brian N. Bershad,
Threads vs. Processes Hank Levy 1.
CS510 Operating System Foundations
Last section! Project 4 + EC due tomorrow Today: Project 4 questions
CSE 542: Operating Systems
CSE451 - Section 10.
CSE 542: Operating Systems
CS703 – Advanced Operating Systems
CSE 451: Operating Systems Winter 2001 Lecture 5 Threads
Paging Andrew Whitaker CSE451.
Threads CSE 2431: Introduction to Operating Systems
CS Introduction to Operating Systems
Presentation transcript:

CSE 542: Operating Systems Outline ACM Symposium on OS Principles (SOSP) 1991 Using Continuations to Implement Thread Management and Communication in Operating Systems Richard P. Draves, Brian N. Bershad, Richard F. Rashid, Randall W. Dean Reduce kernel thread stack space Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism. Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska, and Hank M. Levy Cooperative mechanism to enjoy the benefits of user level and kernel level threads 10-Jun-19 CSE 542: Operating Systems

OS/Application threading… When a application requests service from the kernel, the user level process saves its state and makes a system call into kernel (crossing the supervisor protection boundary). The question is, what happens inside the kernel, do you have a kernel thread per user level threads? What happens if the kernel thread blocks on page fault (multiprocessor kernels allow kernels to be paged in) 10-Jun-19 CSE 542: Operating Systems

Processing within kernel Process model Multiple threads within kernel - one kernel stack per thread Unique kernel stack - rescheduled and descheduled transparently (entire state is saved) E.g. UNIX Easy to use as blocking is transparent Cannot optimize unwanted “stack” space (4KB per thread) Interrupt model Single per-processor stack Threads explicitly save state before blocking E.g. Quicksilver, V 10-Jun-19 CSE 542: Operating Systems

CSE 542: Operating Systems Possible solution User level thread - one kernel thread for many user level threads At least need one kernel level thread Blocked kernel threads still wasted resources Continuations Provide code to save state Behaves like process model Performance of interrupt model Allows further optimizations 10-Jun-19 CSE 542: Operating Systems

CSE 542: Operating Systems Key idea Optimizing Mach 3.0 Application level representation of state while blocked Application code to restore stack Optimizations to reduce continuation operations: fast hand off for RPCs Tradeoff stack space for complexity (application code) Is this relevant? Current processors have lots of memory, so why bother? Per processor kernel stack reduce cache and TLB misses Software engineering concerns? Interrupt driven, co-routine style services Much current work in MS Research and other places 10-Jun-19 CSE 542: Operating Systems

CSE 542: Operating Systems 10-Jun-19 CSE 542: Operating Systems

User level, Kernel level threads? User level threads Fast - the kernel does not need to know when there is a switch Flexible - each process can use its own scheduler Can block - Kernel does not know about the existence of user level threads Question: How many kernel threads to use? If you use too little, then you don’t fully use the system and blocked threads can be a problem if you use too much (to protect against blocked threads) then the OS can schedule kernel threads that have a blocked/idle user level thread, threads that are in spinlock (while (condition is false);), priority inversion of user level threads Kernel level threads Can block - kernel can schedule other kernel level threads Slower - protection boundary crossed 10-Jun-19 CSE 542: Operating Systems

CSE 542: Operating Systems Scheduler activation Cooperative mechanism Kernel informs the user process of number of virtual “processors” as well as change in the number of processors User threads use these processors without informing the kernel on the scheduling decisions Scheduling decision by the user level library + Processor allocation, blocked thread processing etc by kernel scheduler activation mechanism User thread can request and relinquish virtual processors Upcalls from kernel to application System calls from application to kernel 10-Jun-19 CSE 542: Operating Systems