On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni.

Slides:



Advertisements
Similar presentations
Processes Management.
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.
Computer Systems/Operating Systems - Class 8
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.
Chapter 5 Processes and Threads Copyright © 2008.
Concurrency: Mutual Exclusion and Synchronization Why we need Mutual Exclusion? Classical examples: Bank Transactions:Read Account (A); Compute A = A +
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
CS533 Concepts of Operating Systems Class 3 Monitors.
1 On the Duality of Operating System Structures by Hugh C. Lauer, Xerox Corporation and Roger M. Needham, Cambridge University Presented by Scott Fletcher.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Concurrency CS 510: Programming Languages David Walker.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
“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.
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
CS533 - Concepts of Operating Systems
On the Duality of Operating System Structures Hugh Lauer Xerox Corporation Roger Needham Cambridge University Presented by Yahia Mahmoud.
Communication in Distributed Systems –Part 2
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
1 I/O Management in Representative Operating Systems.
PRASHANTHI NARAYAN NETTEM.
Inter-Process Communication Mechanisms CSE331 Operating Systems Design.
FINAL MPX DELIVERABLE Due when you schedule your interview and presentation.
Dave Archer - CS533 - Spring On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
On the Duality of Operating System Structures 1. Hugh C. Lauer Xerox Corporation Palo Alto, Californi a Roger M. Needham Cambridge University Cambridge,
6 Memory Management and Processor Management Management of Resources Measure of Effectiveness – On most modern computers, the operating system serves.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
CS533 - Concepts of Operating Systems 1 On The Duality of Operating System Structures Hugh Lauer, Xerox Roger Needham, Cambridge University 1979 Presented.
EEE440 Computer Architecture
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
Using a simple Rendez-Vous mechanism in Java
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.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
CS533 – Spring Jeanie M. Schwenk Experiences and Processes and Monitors with Mesa What is Mesa? “Mesa is a strongly typed, block structured programming.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
By: Rob von Behren, Jeremy Condit and Eric Brewer 2003 Presenter: Farnoosh MoshirFatemi Jan
REVIEW OF “ON THE DUALITY OF OPERATING SYSTEM STRUCTURES” Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
© 2004, D. J. Foreman 1 Monitors and Inter-Process Communication.
Channels. Models for Communications Synchronous communications – E.g. Telephone call Asynchronous communications – E.g. .
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Chapter 3: Process Concept
On the Duality of Operating System Structures
Concurrency, threads, and events
Processes Overview: Process Concept Process Scheduling
CS533 Concepts of Operating Systems
Lecture 2: Processes Part 1
Recap OS manages and arbitrates resources
On the Duality of Operating System Structures
Midterm review: closed book multiple choice chapters 1 to 9
Threads Chapter 4.
Channels.
Hugh Lauer Xerox Corporation Roger Needham Cambridge University
Operating Systems : Overview
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Operating Systems : Overview
Channels.
Channels.
On the Duality of Operating System Structures
Monitors and Inter-Process Communication
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:

On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni

Agenda  Introduction  Elaboration – Message-oriented Systems  Elaboration – Procedure-oriented Systems  Duality between the two systems  Events and Threads as duals  Conclusion

Introduction Categories of operating systems:  Message-oriented System:  Small, static number of big processes  Explicit set of message channels  Limited amount of direct sharing  Context of execution with processes

Introduction  Procedure-oriented System:  Large number of very small processes  Rapid creation and deletion of processes  Extensive use of interlocked shared memory  Context of execution with function being executed executed

Introduction – Concept of Duality  The two categories are duals of each other other  Dual programs or subsystems are logically identical to each other logically identical to each other  Have identical performance

Message-oriented Systems (Message Passing) Characterized by:  Execution is in separate address spaces  Message passing facilities  Message queuing  Messaging primitives  Processor pre-emption occurs when 'higher priority' process receives message priority' process receives message

Message-oriented Systems Good Design Practices:  Message queuing provides synchronization of processes and queuing of congested resources processes and queuing of congested resources  Data passed by reference in messages  Peripheral devices treated as processes  Static assignment of priorities to processes  No global naming schemes

Message-oriented Systems Facilities:  Messages, Message identifiers  Message channels, Message ports  Message Transmission operations:  SendMessage[ messageChannel, messageBody ] returns [ messageId ] [ messageId ]  AwaitReply[ messageId ] returns [ messageBody ]  WaitForMessage[ set of messagePort ] returns [ messageBody, messageld, messagePort ] [ messageBody, messageld, messagePort ]  SendReply[ messageId, messageBody ] Process declaration Process declaration CreateProcess CreateProcess

Procedure-oriented Systems (Shared Memory) Characterized by:  Protection and addressing mechanism  Rapid context switching  Cooperation among processes via synchronizing primitives synchronizing primitives  Processes queue on locks  Lock queue favors 'higher priority' process on a lock release on a lock release

Good Design Practices:  Lock queuing provides synchronization of processes and queuing of congested resources and queuing of congested resources  Direct sharing of data among processes  Data locks are kept short and small  Creation and deletion of a process is cheap and easy  Interaction with peripheral devices is through shared memory memory  Processes inherit priorities dynamically  Global naming schemes are important Procedure-oriented Systems

Facilities:  Procedures  Procedure call facilities, synchronous and asynchronous  processld <- FORK procedureName[ parameterList ]  [ resultList ] <- JOIN processld  Modules and monitors  Module instantiation with NEW and START  Condition variables  WAIT conditionVariable  SIGNAL conditionVariable

Duality: Primitive Mapping Message-oriented system Processes, CreateProcess Message Channels Message Ports SendMessage; AwaitReply (immediate) SendMessage;... AwaitReply (delayed) SendReply main message loop arms of the case statement selective waiting for messages Monitors, NEW/START External procedure identifiers ENTRY procedure identifiers Simple procedure call FORK;...JOIN RETURN (from procedure) Monitor lock, ENTRY attribute ENTRY procedure declarations condition variables, WAIT, SIGNAL Procedure-oriented system

Duality Mapping: Events and Threads Event handler for sending a message which blocks waiting for reply Separate event handlers for sending message and waiting for reply Event handler for replying to a message Main event handling loop in event-based systems Invocation of an appropriate event handler Events wait in the event queue until they are processed Normal procedure call, by a thread, which returns (like Mesa procedure call) (like Mesa procedure call) ‘Forking’ a thread and then ‘joining’ it Return from a procedure call Acquiring of the mutual exclusion lock on the monitor by a thread Execution of an ENTRY procedure of a monitor by a thread Threads wait on condition variables until some event or condition has occurred

Accept Connection Read Request Find File Send Header Read File Send Data A Process made of multiple events Accept Connection Read Request Find File Send Header Read File Send Data Event Dispatcher Socket()Read()Find()Send() Event handlers N such processes Main event handling loop in event-based systems

Accept Connection Read Request Find File Send Header Read File Send Data Accept Connection Read Request Find File Send Header Read File Send Data Monitor (Acquire Lock of a shared resource) N such threads Accept Connection Read Request Find File Send Header Read File Send Data Accept Connection Read Request Find File Send Header Read File Send Data Acquiring of the mutual exclusion lock on the monitor by a thread

Duality: Logic  Similarity of Programs:  Control structures directly translated  Initialization code moved  No algorithms changed  No data structures replaced  No interface strategies affected

Duality: Performance  Preservation of Performance:  Algorithms compute at the same speed  Same amount of information stored in each data structure data structure  Same amount of client code executed in each system system  Same amount of computing power required and so system performance will remain and so system performance will remain unchanged unchanged

Conclusions  No inherent difference between the two models  Neither model is inherently preferable  Choice between models is based on platform and not the application and not the application  Typical systems are not perfect examples of either model either model  Empirical Paper - No proper validations for claim  Performing the transformation in real life may not be so easy may not be so easy