CS533 Concepts of Operating Systems

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

Parallel Processing & Parallel Algorithm May 8, 2003 B4 Yuuki Horita.
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Cooperative Task Management without Manual Stack Management or Event-driven programming is not the.
CSCC69: Operating Systems
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 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.
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.
CS333 Intro to Operating Systems Jonathan Walpole.
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.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
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.
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
The Structuring of Systems Using Upcalls David D. Clark (Presented by John McCall)
Tutorial 2: Homework 1 and Project 1
Microsoft Foundation Classes MFC
Last Class: Introduction
PROCESS MANAGEMENT IN MACH
The Mach System Sri Ramkrishna.
“Language Mechanism for Synchronization”
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
CS510 Operating System Foundations
CS510 Operating System Foundations
Real-time Software Design
Business System Development
#01 Client/Server Computing
The Structuring of Systems Using Upcalls David D. Clark
Cooperative Task Management without Manual Stack Management or, Event-driven Programming is Not the Opposite of Threaded Programming Atul Adya, Jon Howell,
On the Duality of Operating System Structures
Modified by H. Schulzrinne 02/15/10 Chapter 4: Threads.
Threading And Parallel Programming Constructs
Channels.
Structuring Of Systems Using Upcalls - By David D. Clark
Hugh Lauer Xerox Corporation Roger Needham Cambridge University
Threaded Programming in Python
Jonathan Walpole Computer Science Portland State University
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 4: Threads.
Channels.
CS510 Operating System Foundations
Channels.
On the Duality of Operating System Structures
Appendix 3 Object-Oriented Analysis and Design
Monitors and Inter-Process Communication
#01 Client/Server Computing
Asynchronous Programming CS Programming Languages for Web Applications
CS533 Concepts of Operating Systems Class 4
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 Jonathan Walpole

On The Duality of Operating System Structures

The Basic Idea 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 neither one is inherently better that the other

Message Oriented Systems Small number of long-lived processes Communication via message channels/queues each process extracts a request from its queue processes it before extracting the next request no shared data!

Message Oriented Systems This is essentially event-based programming - no shared data, no need to synchronize access to shared data - reactive execution model using handler functions - each request is executed to completion

Procedure Oriented Systems Global shared data with accesses from multiple threads synchronized using monitors - monitors = locks and condition variables Thread per task model - threads may be short-lived (created to handle a single task) - they can access any data - they communicate using shared data

The Duality Argument What encapsulates the data? How do control flows synchronize their access to data? How does communication occur? How does a control flow block and resume? What is the real work and how can we separate it from the synchronization framework?

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

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

The Duality 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

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 Which model should you use? - maybe a particular architecture has better hardware support for one model than the other - the choice may depend on the underlying platform