1 On the Duality of Operating System Structures by Hugh C. Lauer, Xerox Corporation and Roger M. Needham, Cambridge University Presented by Scott Fletcher.

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
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.
CAS3SH3 Midterm Review. The midterm 50 min, Friday, Feb 27 th Materials through CPU scheduling closed book, closed note Types of questions: True & False,
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
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.
Concurrency: Mutual Exclusion and Synchronization Why we need Mutual Exclusion? Classical examples: Bank Transactions:Read Account (A); Compute A = A +
CS 584. A Parallel Programming Model We need abstractions to make it simple. The programming model needs to fit our parallel machine model. Abstractions.
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.
Concurrency CS 510: Programming Languages David Walker.
1 Process Description and Control Chapter 3. 2 Process Management—Fundamental task of an OS The OS is responsible for: Allocation of resources to processes.
Processes 1 CS502 Spring 2006 Processes Week 2 – CS 502.
“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
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
On the Duality of Operating System Structures Hugh Lauer Xerox Corporation Roger Needham Cambridge University Presented by Yahia Mahmoud.
Computer Organization and Architecture
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
1/26/2007CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
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,
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
1 Announcements The fixing the bug part of Lab 4’s assignment 2 is now considered extra credit. Comments for the code should be on the parts you wrote.
CS533 - Concepts of Operating Systems 1 On The Duality of Operating System Structures Hugh Lauer, Xerox Roger Needham, Cambridge University 1979 Presented.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
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.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
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.
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
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.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
Channels. Models for Communications Synchronous communications – E.g. Telephone call Asynchronous communications – E.g. .
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Big Picture Lab 4 Operating Systems C Andras Moritz
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Memory Management.
Chapter 3: Process Concept
On the Duality of Operating System Structures
Concurrency, threads, and events
Chapter 2: System Structures
CS533 Concepts of Operating Systems
Chapter 3: Open Systems Interconnection (OSI) Model
Threads, SMP, and Microkernels
Recap OS manages and arbitrates resources
On the Duality of Operating System Structures
Lecture 4- Threads, SMP, and Microkernels
Threads Chapter 4.
Channels.
Hugh Lauer Xerox Corporation Roger Needham Cambridge University
Operating Systems : Overview
Operating Systems : Overview
Channels.
Channels.
On the Duality of Operating System Structures
Chapter 13: I/O Systems.
CS533 Concepts of Operating Systems Class 4
Presentation transcript:

1 On the Duality of Operating System Structures by Hugh C. Lauer, Xerox Corporation and Roger M. Needham, Cambridge University Presented by Scott Fletcher

2 Authors’ Claim Most operating systems (or subsystems) can be classified into one of two models –Message-Oriented –Procedure-Oriented These two models represent a duality –Identical in logic and performance The argument should not be which model is “better”, but which model is “better suited” to the machine architecture upon which the system is being built

3 Message-Oriented Systems Small, static process count Explicit messages for communication –Passing (Message Channels) –Queuing (Message Ports) –Waiting for Data (MsgWait) Persistent Bindings –complexity in creating processes Primitive Message Transmission Operations: –Send –Wait (WaitForMessage) –SendReply –AwaitReply Preemption driven by message arrival –When a higher priority process is waiting Little to no sharing of address spaces –Data or pointers passed in messages Producer Consumer Send Wait AwaitReply SendReply Channel Ports Execution “Stream” Data “Stream”

4 Message-Oriented Systems Summary: –The number of processes and the connections between them are relatively static –Specific communications are established between particular pairs of processes –Messages are passed between processes –Processes rarely share data in memory

5 Procedure-Oriented System Characterized by: –A protection and addressing mechanism oriented toward procedures –Procedure call facilities which can rapidly take a process from one context to another –Cooperation among processes is achieved by some form of locks, semaphores, monitors, or other synchronizing data structures

6 Procedure-Oriented System Large, dynamic process count Shared data system for communication –Passing (Variables) –Queuing (Monitors) –Waiting for Data (Condition Variables) Persistent State –Complexity in creating shared data Primitive Operations –Wait –Signal –Fork –Join Preemption driven by release of lock –When a higher priority process is waiting Little or no messaging –Data or pointers passed in shared variables Producer Consumer Signal Wait

7 Procedure-Oriented System Summary: –Creating processes is easy as no communication channels have to be set up between them –Global/shared data is protected and accessed through locking mechanisms and synchronization –A process typically has only one goal or task, and it wanders throughout the system in order to get that thing done

8 Characteristics of the Models The two styles of system design are a duality –Def: A duality translates concepts, theorems, or mathematical structures into other concepts, theorems or structures in a one-to-one fashion –A program for one kind of system can be mapped into a program appropriate for the other –As a result of this mapping, the logic of the programs in the dual systems is invariant –The performance of the system can be preserved across the mapping

9 The Duality Mapping Message-oriented systemProcedure-oriented system Processes, CreateProcessMonitors, NEW/START External Message Channels MessageProcedure identifiers ENTRY PortsProcedure identifiers simple SendMessage; AwaitReply (immediate)Procedure call SendMessage;... AwaitReply (delayed)FORK;...JOIN SendReplyRETURN (from procedure) monitor main loop of standard resource manager, WaitForMessage statement, case statement Lock, ENTRY attribute Arms of the case statement selectiveENTRY procedure declarations Waiting for messagesCondition Variables, WAIT, SIGNAL

10 The Duality Mapping Producer Consumer  - dual operations   Signal Wait Send Wait WaitReply SendReply         Channel Ports Execution “Stream” Data “Stream” Execution “Stream” Data “Stream”

11 Similarity of Programs The system, or subsystem, of one style can be transformed directly into the other by replacing each construct with its corresponding construct The transformation does not affect the logic of the client programs: –no algorithms are changed –no data structures are replaced –no interface strategies are affected

12 Preservation of Performance The dynamic behavior of a system of programs has three components: –The execution times of the programs themselves –The computational overhead of the primitive system operations they call –The queuing and waiting times which reflect the congestion and sharing of resources, dependence upon external events, and scheduling decisions

13 Preservation of Performance Execution Time The duality transformation leaves the main bodies of the programs untouched: –The algorithms will compute at the same speed –The same amount of information will be stored in each data structure –The same amount of client code will be executed in each of the systems –The same number of additions, multiplications, comparisons, and string operations will be performed

14 Preservation of Performance Computational Overhead The facilities of each of the two canonical models can be made to execute as efficiently as the corresponding facilities of the other model: –Sending a message has the same computational complexity as that of calling or FORKING to an ENTRY procedure –Leaving a monitor has the same complexity as that of waiting for new messages –Process switching can be made equally fast in either system, and for similar machine architectures this means saving the same amount of state information –Virtual memory and paging or swapping can be used with equal effectiveness in either model

15 Preservation of Performance Queuing and Waiting Times The basic operations of the two models can also be made to behave identically with respect to the scheduling and dispatching of client processes (corresponding events will happen in the same order): –If the message has to be queued at the destination process, then the procedure call will also be queued at its monitor, WAIT statement, or JOIN statement (for the same length of time) –The peripheral devices will exhibit the same behavior with respect to latency, response time, and transfer times –The scheduling and dispatching can be arranged so that the same number of context switches and allocations of message blocks take place whether it is a message-oriented or a procedure-oriented system

16 Underlying Differences There is no inherent difference between the two styles of system design or the programs that use them –0 th order = similar program structure and performance –1 st order = similar computational complexity –Preferring one style over another = 2 nd order or higher

17 Final Arguments Neither model is “better” than the other Both strategies can be built to provide identical performance, logical soundness, elegance, and correctness Deciding to use one strategy over the other will NOT introduce any fundamental incompatibilities As both styles are duals in regards to the most important considerations for designing an OS, the design selected should be based, first and foremost, on the machine architecture upon which the system is being built

18 Thanks Thanks to Dave Archer and his slides from Spring ‘06 for providing some nice graphics Thanks for listening