review of on the duality of operating system structures paper by hugh c. lauer and roger m. needham...

32
REVIEW OF “ON THE DUALITY OF OPERATING SYSTEM STRUCTURES” Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Upload: madlyn-sims

Post on 19-Jan-2018

222 views

Category:

Documents


0 download

DESCRIPTION

Brief Overview

TRANSCRIPT

Page 1: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

REVIEW OF “ON THE DUALITY OF OPERATING SYSTEM STRUCTURES”Paper by Hugh C. Lauer and Roger M. NeedhamPresentation by Erin Chapman

Page 2: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Presentation Outline Brief overview of the ideas in the paper The two models

Message-oriented systems Procedure-oriented systems

Equivalence of the models Duality mapping Preservation of performance

Conclusions

Page 3: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Brief Overview

Page 4: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Overview Operating System designs generally fit

two types Message-oriented systems Procedure-oriented systems

These systems are duals of each other Constructs have direct counterparts Programs are logically equivalent Performance doesn’t differ between models

Page 5: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Message-Oriented System

The Two Models

Page 6: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Message-Oriented System System for passing messages easily Creates message queues for processes Processes are given operations for

Sending a message Waiting for any messages Waiting for a particular type of message Examining the queue

Pre-emption when message arrives at a higher priority process

Page 7: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Systems Have… Specific communication paths between

processes Static number of processes Static number of connections between

processes Processes execute in static context

No shared memory

Page 8: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Systems with Good Design Process associated with a resource

implements synchronization and queuing for it

If more than one process needs a data structure, pass by reference

Peripheral devices treated as processes Static process priority Process works on one message at a time

Page 9: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Environment: Structures Messages: data structure for sending

information Message Identifiers: handle to identify a

particular message Message Channel: Identifies destination

of a message Message Port: Queue for holding

messages of a certain type for a particular process

Page 10: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Environment: Message Transmission SendMessage(messageChannel,

messageBody) Returns messageID

AwaitReply(messageID) Returns messageBody

WaitForMessage({set of messagePort}) Returns (messageBody, messageID,

messagePort) SendReply(messageID, messageBody)

Page 11: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Environment: Processes Process Declaration

Local data and algorithms Message ports Message channels for other processes

CreateProcess Operation

Page 12: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Procedure-Oriented System

The Two Models

Page 13: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Procedure-Oriented System Protection and addressing mechanism Efficient procedure calls Cooperation between processes done

through locked data structures Pre-emption when a higher priority

process gets a lock it was waiting on

Page 14: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Systems Have… Global data is protected and easily

accessed Process creation is efficient and easy Processes have one goal but may

wander through the system to do it

Page 15: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Systems with Good Design Synchronization done through locks on

data structures A process will lock only small amounts at

one time Data is shared between processes Peripherals are controlled by locks and

shared memory Processes have dynamic priorities Global naming scheme often used

Page 16: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Environment: Procedures Procedure

Algorithms Local data Parameters Results

Page 17: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Environment: Procedure Calls Synchronous Asynchronous

fork procedureName(parameterList) Returns processID

join processID Returns (resultsList)

Page 18: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Environment: Modules and Monitors Module: primitive unit of compilation

Procedures Data

Monitor: special module protected by a lock Only one process can execute it at a time

Module Instantiation new start

Page 19: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Environment: Condition Variables Must be in a monitor Associated queue of processes Operations:

wait conditionVariable signal conditionVariable

Page 20: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Duality Mapping

Equivalence of the Models

Page 21: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

The Duality Mapping

Process, CreateProcess

Message channels, Message

Ports SendMessage;

AwaitReply; (immediate)

Monitors, new/start

Procedure identifiers, entry

Procedure identifiers

Procedure call

Message-Oriented System Procedure-Oriented System

Page 22: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

The Duality Mapping

SendMessage; … AwaitReply; (delayed)

SendReply

fork; … join;

return (from procedure)

Message-Oriented System Procedure-Oriented System

Page 23: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

The Duality Mapping

Main loop of standard resource manager, WaitForMessage, case statement

Arms of the case statement selective

Lock, entry attribute

entry

Message-Oriented System Procedure-Oriented System

Page 24: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

The Duality Mapping

Waiting for messages

Condition variables, wait, signal

Message-Oriented System Procedure-Oriented System

Page 25: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Similarity of the Models Programs can be transformed using the

duality mapping Logic of program not affected by

transformation This only works if the strict model

employed in the paper is used

Page 26: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Preservation of Performance

Equivalence of the Models

Page 27: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Same Execution Characteristics Execution time Computational load Queuing Wait times Execution time of system primitives

Page 28: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Program Unchanged by Transform Same…

Execution speed Amount of information stored Amount of code

Interaction between programs doesn’t change

Total lifetime computation is the same

Page 29: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Conclusions

Page 30: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Conclusions Little empirical support No inherent differences between the

models Choose model based on

Machine architecture Programming environment

Eliminates some degrees of freedom in the design process

Page 31: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

Questions?

Page 32: REVIEW OF ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman

References Lauer, Hugh C. and Needham, Roger M.,

“On the Duality of Operating System Structures”, Proceedings of the Second International Symposium on Operating Systems, IR1A, Oct. 1978, reprinted in Operating Systems Review, 13, 2 April 1979, pp. 3-19.