CS533 Concepts of Operating Systems Class 4

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

Concurrency, Thread and Event CS6410 Sept 6, 2011 Ji-Yong Shin.
Hugh Lauer Xerox Corporation Roger Needham Cambridge University Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011.
1 On the Duality of Operating System Structures by Hugh C. Lauer, Xerox Corporation and Roger M. Needham, Cambridge University Presented by Scott Fletcher.
CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.
Concurrency: Mutual Exclusion, Synchronization, Deadlock, and Starvation in Representative Operating Systems.
“Why Events are a Bad Idea (For high-concurrency servers)” Paper by Rob von Behren, Jeremy Condit and Eric Brewer, May 2003 Presentation by Loren Davis,
1 On the Duality of Operating System Structures Hugh Lauer, Xerox Roger Needham, Cambridge University Oct 1978, reprinted April 1979 Presented by David.
CS533 - Concepts of Operating Systems
On the Duality of Operating System Structures Hugh Lauer Xerox Corporation Roger Needham Cambridge University Presented by Yahia Mahmoud.
CS533 Concepts of Operating Systems Class 2 The Duality of Threads and Events.
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
1 I/O Management in Representative Operating Systems.
On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni.
What is the output generated by this program? Please assume that each executed print statement completes, e.g., assume that each print is followed by an.
Dave Archer - CS533 - Spring On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham.
On the Duality of Operating System Structures 1. Hugh C. Lauer Xerox Corporation Palo Alto, Californi a Roger M. Needham Cambridge University Cambridge,
DISTRIBUTED COMPUTING PARADIGMS. Paradigm? A MODEL 2for notes
CS533 - Concepts of Operating Systems 1 On The Duality of Operating System Structures Hugh Lauer, Xerox Roger Needham, Cambridge University 1979 Presented.
(a) What is the output generated by this program? In fact the output is not uniquely defined, i.e., it is not always the same. So please give three examples.
Lecture 8 Page 1 CS 111 Online Other Important Synchronization Primitives Semaphores Mutexes Monitors.
ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Hugh C. Lauer and Roger M. Needham Presented by: Ali R. Butt (adapted from many slides available online and.
Computer Science and Engineering Copyright by Hesham El-Rewini Advanced Computer Architecture CSE 8383 March 20, 2008 Session 9.
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
REVIEW OF “ON THE DUALITY OF OPERATING SYSTEM STRUCTURES” Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 April 7, 2005 Session 23.
Concepts of Multithreading CS 378 – Mobile Computing for iOS Dr. William C. Bulko.
Last Class: Introduction
PROCESS MANAGEMENT IN MACH
The Mach System Sri Ramkrishna.
COT 4600 Operating Systems Fall 2009
Advanced Topics in Concurrency and Reactive Programming: Asynchronous Programming Majeed Kassis.
On the Duality of Operating System Structures
Concurrency, threads, and events
CS240: Advanced Programming Concepts
Outline Other synchronization primitives
CS399 New Beginnings Jonathan Walpole.
Other Important Synchronization Primitives
CS533 Concepts of Operating Systems
Processes David Ferry, Chris Gill
INTER-PROCESS COMMUNICATION
#01 Client/Server Computing
Applied Operating System Concepts
Threads and Data Sharing
On the Duality of Operating System Structures
Modified by H. Schulzrinne 02/15/10 Chapter 4: Threads.
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
Threading And Parallel Programming Constructs
Half-Sync/Half-Async (HSHA) and Leader/Followers (LF) Patterns
Channels.
Structuring Of Systems Using Upcalls - By David D. Clark
Hugh Lauer Xerox Corporation Roger Needham Cambridge University
Concurrency: Mutual Exclusion and Process Synchronization
Threaded Programming in Python
Chapter 2: The Linux System Part 5
Jonathan Walpole Computer Science Portland State University
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 4: Threads.
CS533 Concepts of Operating Systems Class 11
Channels.
CS510 Operating System Foundations
Channels.
On the Duality of Operating System Structures
Monitors and Inter-Process Communication
Chapter 3: Process Management
#01 Client/Server Computing
Asynchronous Programming CS Programming Languages for Web Applications
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

CS533 Concepts of Operating Systems Class 4 On The Duality of Operating System Structures

CS533 - Concepts of Operating Systems The basic idea There are two common ways to structure systems: message oriented (i.e., event based) procedure oriented (i.e., multi-threaded) They are duals of each other any program written in one form can be automatically transformed into the other form with no loss of functionality Don’t waste your time arguing about which one is inherently better CS533 - Concepts of Operating Systems

Message oriented systems Small number of long-lived processes (or threads) Communication among the processes only via message channels/queues each process extras message requests from its queue and processes them before extracting the next request no shared data Essentially the same as event-based programming no shared data, no need to synchronize access to shared data reactive execution model using handlers each request is executed to completion CS533 - Concepts of Operating Systems

Procedure oriented systems Globally shared data with accesses from multiple threads synchronized using monitors (locks and condition variables) Process/thread per task model threads may be short-lived (created by fork to handle a task) they can wander all over the system and access any data communication among threads is via the shared data CS533 - Concepts of Operating Systems

CS533 - Concepts of Operating Systems The duality mappings Process == monitor Message channel == monitor entry method send message, wait for reply == entry method call asynchronous send, work, wait == fork, work, join send reply == return main loop, wait for message == lock, entry method wait for message == wait on condition variable send message == signal condition CS533 - Concepts of Operating Systems

CS533 - Concepts of Operating Systems The duality One form can be converted into the other via a straightforward program transformation The logic of the program itself is unchanged The structure of the program is unchanged Any visual difference is purely syntactic computation is triggered by SendMessage in one model and Fork or Signal in the other computation is blocked by AwaitReply or WaitForMessages in one model and by Join or WaitCondition in the other data access is serialized by the WaitForMessages loop in one model and by a Monitor Mutex in the other CS533 - Concepts of Operating Systems

CS533 - Concepts of Operating Systems Conclusion Disagreement between the two sides seems to be based more on emotion than fact there really isn’t a fundamental difference between these two models So how should you decide which model to use? maybe a particular architecture has better hardware support for one model than the other i.e., which one is better depends on the platform you are running on CS533 - Concepts of Operating Systems