CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.

Slides:



Advertisements
Similar presentations
Go Language * Go - Routines * Channels. New Concepts Do not communicate by sharing memory; instead, share memory by communicating. creating shared memory.
Advertisements

CS533 Concepts of Operating Systems Jonathan Walpole.
SEDA: An Architecture for Well- Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
CS533 Concepts of Operating Systems Class 5 Integrated Task and Stack Management.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
Tao Yang, UCSB CS 240B’03 Unix Scheduling Multilevel feedback queues –128 priority queues (value: 0-127) –Round Robin per priority queue Every scheduling.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.
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.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
3.5 Interprocess Communication
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Ch 4: Threads Dr. Mohamed Hefeeda.
CS 3013 & CS 502 Summer 2006 Week 1 Review and Class Discussion 1 Review (last week) Three important terms Abstraction Concurrency Resource Critical Sections.
CS533 Concepts of Operating Systems Class 7 Integrated Task and Stack Management.
CS Distributed Computing Systems Chin-Chih Chang, An Introduction to Threads.
CS533 - Concepts of Operating Systems 1 CS533 Concepts of Operating Systems Class 8 Synchronization on Multiprocessors.
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.
1 Chapter 4 Threads Threads: Resource ownership and execution.
Chapter 4: Threads. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Objectives Thread definitions and relationship to process Multithreading.
Process Concept An operating system executes a variety of programs
CS 3013 & CS 502 Summer 2006 Threads1 CS-3013 & CS-502 Summer 2006.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
 A JavaScript runtime environment running Google Chrome’s V8 engine ◦ a.k.a. a server-side solution for JS ◦ Compiles JS, making it really fast  Runs.
Synchronization and Scheduling in Multiprocessor Operating Systems
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
Processes and Threads Processes have two characteristics: – Resource ownership - process includes 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.
Copyright ©: University of Illinois CS 241 Staff1 Threads Systems Concepts.
CS333 Intro to Operating Systems Jonathan Walpole.
CSE 451: Operating Systems Winter 2015 Module 5 1 / 2 User-Level Threads & Scheduler Activations Mark Zbikowski 476 Allen Center.
15.1 Threads and Multi- threading Understanding threads and multi-threading In general, modern computers perform one task at a time It is often.
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
CSC Multiprocessor Programming, Spring, 2012 Chapter 11 – Performance and Scalability Dr. Dale E. Parson, week 12.
CS399 New Beginnings Jonathan Walpole. 2 Concurrent Programming & Synchronization Primitives.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
By: Rob von Behren, Jeremy Condit and Eric Brewer 2003 Presenter: Farnoosh MoshirFatemi Jan
SEDA An architecture for Well-Conditioned, scalable Internet Services Matt Welsh, David Culler, and Eric Brewer University of California, Berkeley Symposium.
CS533 Concepts of Operating Systems Jonathan Walpole.
CS533 Concepts of Operating Systems Jonathan Walpole.
CS533 - Concepts of Operating Systems 1 Threads, Events, and Reactive Objects - Alan West.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Cooperative Task Management without Manual Stack management Hanyun Tao EECS 582 – W161.
Page 1 2P13 Week 1. Page 2 Page 3 Page 4 Page 5.
2.2 Threads  Process: address space + code execution  There is no law that states that a process cannot have more than one “line” of execution.  Threads:
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Processes and Threads Processes and their scheduling
Chapter 4: Multithreaded Programming
CPU Scheduling – Multiprocessor
Chapter 15, Exploring the Digital Domain
Lecture 21: Introduction to Process Scheduling
Operating Systems.
CSE 451: Operating Systems Autumn 2003 Lecture 5 Threads
CSE 451: Operating Systems Winter 2003 Lecture 5 Threads
Multithreaded Programming
Jonathan Walpole Computer Science Portland State University
CS533 Concepts of Operating Systems Class 7
Lecture 21: Introduction to Process Scheduling
- When you approach operating system concepts there might be several confusing terms that may look similar but in fact refer to different concepts:  multiprogramming, multiprocessing, multitasking,
CS510 Operating System Foundations
CS333 Intro to Operating Systems
Process Management -Compiled for CSIT
CS703 – Advanced Operating Systems
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
CSE 451: Operating Systems Winter 2001 Lecture 5 Threads
Lecture Topics: 11/1 Hand back midterms
CSC Multiprocessor Programming, Spring, 2011
Chapter 3: Process Management
Presentation transcript:

CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming

CS533 - Concepts of Operating Systems 2 2 Questions  Why are threads “lightweight”?  Why block instead of spin waiting for a mutex?  If a mutex is a resource scheduling mechanism o What is the resource being scheduled? o What is the scheduling policy and where is it defined?  What is coarse-grain locking? o What effect does it have on program complexity? o What effect does it have on performance?

CS533 - Concepts of Operating Systems 3 3 Questions  What is “lock contention”? o Why is it worse on multiprocessors than uniprocessors? o What is the solution? … and its cost?  What else might cause performance to degrade when you use multiple threads?  Why is multithreaded programming hard?

CS533 - Concepts of Operating Systems 4 Which style is used in modern OSs?  Are modern operating systems (such as Linux) written in an event-based or multi-threaded style?  How does event-based programming relate to interrupt handling?  Where is the boundary between interrupt handling and thread execution? o How does this affect the approaches used for synchronization?

CS533 - Concepts of Operating Systems 5 Concurrent Computation vs Concurrent Blocking  How is the CPU scheduled: o In an event-based system? o In a thread-based system?  How is live state managed across blocking I/O calls: o In an event-based system? o In a thread-based system?

CS533 - Concepts of Operating Systems 6 Managing Highly Concurrent I/O  What is the problem with making thread allocation decisions statically? o What is the Slashdot effect?  Why is multi-threading not a good match for massive concurrency? o Is web service embarrassingly parallel? o What is the problem with the thread-per request model? o Why does the event handling model help?

CS533 - Concepts of Operating Systems 7 Questions  What is a thread pool?  Why do the following techniques help during heavy load? o Thread pool resizing o Event batching o Adaptive load shedding  Why does pipeline parallelism scale well? o Thread per stage vs thread per request  What does it mean for a service to be “well conditioned”?