CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.

Slides:



Advertisements
Similar presentations
1 Processes and Threads Creation and Termination States Usage Implementations.
Advertisements

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.
The Kernel Abstraction. Challenge: Protection How do we execute code with restricted privileges? – Either because the code is buggy or if it might be.
Computer Systems/Operating Systems - Class 8
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,
CS533 Concepts of Operating Systems Class 5 Integrated Task and Stack Management.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Chapter 5 Processes and Threads Copyright © 2008.
CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.
1 Concurrent and Distributed Systems Introduction 8 lectures on concurrency control in centralised systems - interaction of components in main memory -
CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.
CS533 Concepts of Operating Systems Class 4 Remote Procedure Call.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
3.5 Interprocess Communication
Threads CSCI 444/544 Operating Systems Fall 2008.
CS533 Concepts of Operating Systems Class 7 Integrated Task and Stack Management.
CS533 Concepts of Operating Systems Class 2 The Duality of Threads and Events.
CS533 Concepts of Operating Systems Class 9 User-Level Remote Procedure Call.
Inter-Process Communication  most OSs provide several abstractions for inter- process communication: message passing, shared memory, etc.  communication.
CPS110: Implementing threads/locks on a uni-processor Landon Cox.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
CS533 Concepts of Operating Systems Class 4 Remote Procedure Call.
CS533 Concepts of Operating Systems Class 14 Extensible Virtual Memory Management.
ThreadsThreads operating systems. ThreadsThreads A Thread, or thread of execution, is the sequence of instructions being executed. A process may have.
Scheduler Activations Jeff Chase. Threads in a Process Threads are useful at user-level – Parallelism, hide I/O latency, interactivity Option A (early.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Operating Systems CSE 411 CPU Management Sept Lecture 11 Instructor: Bhuvan Urgaonkar.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Processes and Threads.
1 Process States (1) Possible process states –running –blocked –ready Transitions between states shown.
CS533 Concepts of Operating Systems Jonathan Walpole.
Scheduler Activations: Effective Kernel Support for the User- Level Management of Parallelism. Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska,
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Thread Scheduling.
Operating Systems Lecture 7 OS Potpourri Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.
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.
CS333 Intro to Operating Systems Jonathan Walpole.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
CPS110: Implementing threads Landon Cox. Recap and looking ahead Hardware OS Applications Where we’ve been Where we’re going.
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.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
Introduction to Operating Systems and Concurrency.
Operating Systems CSE 411 CPU Management Sept Lecture 10 Instructor: Bhuvan Urgaonkar.
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.
What is a Process ? A program in execution.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
CS533 Concepts of Operating Systems Jonathan Walpole.
Low Overhead Real-Time Computing General Purpose OS’s can be highly unpredictable Linux response times seen in the 100’s of milliseconds Work around this.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 2-2: Threads Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
CPS110: Implementing threads on a uni-processor Landon Cox January 29, 2008.
CS 6560: Operating Systems Design
Anton Burtsev February, 2017
CS 3305 System Calls Lecture 7.
Threads & multithreading
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Lecture Topics: 11/1 General Operating System Concepts Processes
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
February 5, 2004 Adrienne Noble
Thomas E. Anderson, Brian N. Bershad,
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
CS510 Operating System Foundations
Process Description and Control in Unix
Process Description and Control in Unix
CS533 Concepts of Operating Systems Class 14
CS703 – Advanced Operating Systems
CS 5204 Operating Systems Lecture 5
Presentation transcript:

CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management

CS533 - Concepts of Operating Systems 2 Questions  What do these terms mean? o process, thread, kernel-level thread, user-level thread, fiber? o user-level thread stack, user stack, kernel stack? o Address space?  In what way are user-level threads “faster” than kernel-level threads? o Aren’t we just layering abstractions on abstractions?

CS533 - Concepts of Operating Systems 3 Questions  How are synchronization operations such as spin- locks and semaphores implemented, i.e., how do you spin and how do you block? o For user level threads? o For kernel level threads?  Why can’t you do preemptive user-level thread scheduling without special kernel (or language runtime) support?

CS533 - Concepts of Operating Systems 4 Questions  How might a user-level thread library support synchronous I/O calls for its threads without losing control of the CPU due to blocking? o Does this constitute stack ripping?  Why can’t you handle page-faults this way?  Why are preemptions of kernel threads a problem for user level thread libraries?

CS533 - Concepts of Operating Systems 5 Questions  What stack management model do most OS kernels export? o How are I/O and page faults events handled?  What differences are there between virtual CPUs (threads) and real CPUs (hardware)? o How are I/O and page fault events handled by code on a real CPU vs on a virtual CPU?  What similarities do kernel-provided scheduler activations have to hardware-provided interrupts?

CS533 - Concepts of Operating Systems 6 Questions  What synchronization-related issues do you have to worry about when writing an interrupt handler? o Do these occur with scheduler activation handlers?  Why must the user-level thread library be reentrant? o How is its pattern of entry points and synchronization concerns similar to or different from kernel-level scheduler code? With scheduler activations and without scheduler activations

CS533 - Concepts of Operating Systems 7 Questions  Why does the kernel delay delivery of a second page-fault SA until the first page-fault SA on the same address has completed?  Why might a user level thread scheduler choose to delay context switching a user level thread that is holding a spin lock? o How can it do this in the presence of kernel preemption and notification via scheduler activations?

CS533 - Concepts of Operating Systems 8 Questions  In what ways do scheduler activations mix manual and automatic stack management models?

CS533 - Concepts of Operating Systems 9 Duality  What really happens underneath the abstraction? o For synchronous procedure calling and message passing o For asynchronous procedure calling and message passing  Fundamental tasks: execute new instruction stream exchange data  What is the cost of pushing state onto the stack and popping it off, vs the cost of allocating copying then freeing message memory?

CS533 - Concepts of Operating Systems 10 Optimizations Discussed in Future Classes  How could you optimize context switch costs for local message passing?  How could you optimize data movement costs for local message passing? o What conventions would you need to follow to avoid needing synchronization? o How does this approach compare to local state management in procedure calling?  How might you further optimize pointer passing? o … and what does this remind you of? Hint: SP.

CS533 - Concepts of Operating Systems 11 Duality  Is threading just an automated “pattern” of context switch and data exchange that is done manually in event models?  Do the two models have equal memory consumption? o Is over-allocation of memory inevitable in thread-based systems? If not, how can you avoid it … and at what cost?