Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dave Archer - CS533 - Spring 2006 1 On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham.

Similar presentations


Presentation on theme: "Dave Archer - CS533 - Spring 2006 1 On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham."— Presentation transcript:

1 Dave Archer - CS533 - Spring 2006 1 On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham

2 Dave Archer - CS533 - Spring 2006 2 Duality Defined In Boolean algebra, if f(i 1, i 2, …) is true, dual f’ is also true, formed by swapping with +, i with ¬i In this paper, OS models are dual if –functionally equivalent –can be transformed into one another by interchanging primitives for process structure and cooperation a b a b =

3 Dave Archer - CS533 - Spring 2006 3 Motivation, Goals, Approach “Religious argument” over design slows innovation Characterize and classify operating systems designs –As message-oriented or procedure-oriented Most systems biased toward one of these –By process structure, synchronization, IPC –Using an “idealized” model for each Show duality, equivalence » short-circuit decision process “Empirical” = “Engineering” approach –Observation and generalization –Informal reasoning, empirical support –Conclusion Motive Goals Approach

4 Dave Archer - CS533 - Spring 2006 4 Welsh’s “Event-Driven Server” Request FSM Scheduler Disk Network Producer Consumer Event Queue Small number of threads Event queues Processing organized in “handlers” Server maintains continuation state

5 Dave Archer - CS533 - Spring 2006 5 Lauer’s Message-Oriented OS Producer Consumer Send Wait WaitReply SendReply Channel Ports Execution “Stream” Data “Stream” Typically real-time, e.g. Cisco Catalyst Small, static process count Explicit messages for communication –Passing (channels), queueing (ports), waiting for (MsgWait) data –Persistent bindings = complexity in creating processes Cooperation by encapsulating data/ptrs in messages Pre-emption driven by message arrival –When a higher priority process is waiting Little or no sharing of address spaces –Data or pointers passed in messages

6 Dave Archer - CS533 - Spring 2006 6 Welsh’s “Threaded Server” Request 1 Request 2 Request 3 Request 4 Request 5 Dispatcher Network Producer Consumer Protected, Shared Data Large, dynamic thread count Shared data structures Processing organized in threads Thread maintains state

7 Dave Archer - CS533 - Spring 2006 7 Procedure-oriented OS Typically time-sharing – most familiar OSs today Large, dynamic process count Explicit shared data system for communication –Passing (vars), queueing (monitors), waiting for (cond. vars) data –Persistent state = complexity in creating shared data Cooperation by encapsulating data in monitors Pre-emption driven by release of lock –When a higher priority process is waiting Little or no messaging –data or pointers passed in shared vars Producer Consumer Signal Wait

8 Dave Archer - CS533 - Spring 2006 8 Producer Consumer  - dual operations   Signal Wait Send Wait WaitReply SendReply         Channel Ports Execution “Stream” Data “Stream” Execution “Stream” Data “Stream”

9 Dave Archer - CS533 - Spring 2006 9 Mapping Duality Message-oriented system Processes Message Channel IDs Port numbers SndMsg…WaitReply –Immediate –Delayed SendReply WaitForMsg Main loop CASE arguments Send message Procedure-oriented system Monitors ENTRY procedure names Simple procedure names Procedure call/return –Simple –Fork/Join Return from Monitor Wait for lock, condition variable ENTRY procedures Signal condition variable

10 Dave Archer - CS533 - Spring 2006 10 Three Observations Two OS classes are duals –One can be directly mapped to the other by replacing primitives Logically identical to each other –almost down to syntax, if we work at it Equivalent in performance? –e.g. queue lengths, wait times, service rates

11 Dave Archer - CS533 - Spring 2006 11 What about Performance? Three areas to worry about –Execution of programs No difference – identical program semantics –Overhead of system calls Send = Call Wait = Leave Process switching, VM access identical Scheduling, dispatching, preemption equally efficient –Can use same disciplines –Queueing and waiting times for shared resources Identical, since scheduling disciplines are equal Hypothesis: Lifetime of similar computation is equal

12 Dave Archer - CS533 - Spring 2006 12 One Conclusion “In the message oriented model, objects move between processes in messages. In the procedure oriented model, processes move between objects by calling procedures.” (loosely quoted from Dearle et al, 1994) Choosing which model to adopt relies on 2 nd -order factors –0 th order = similar program structure, performance of client programs –1 st order = similar computational complexity –2 nd order = machine architecture features, programming environment – set a priori, so will drive decisions Can drive decision closure on process structure and synchronization using these 2 nd order factors

13 Dave Archer - CS533 - Spring 2006 13 Believable? Intuitive, but no formal classification or proof Mixed acceptance among a (biased) peer community Only one “transformable” example 47 citations, mostly taking it on faith –One, Welsh[2002] disputes that performance is equivalent when scaled to Internet server demands –None dispute the claimed functional duality Bottom line: close enough, except re performance

14 Dave Archer - CS533 - Spring 2006 14 References Hugh C. Lauer, Roger M. Needham. “On the Duality of Operating System Structures.” in Proceedings of the Second International Symposium on Operating Systems, IRIA, October 1978, reprinted in Operating Systems Review, 13, 2, pp. 3-19. April 1979. A. Dearle, R. Di Bona, J. Farrow, F. Henskens, A. Lindstrom. J. Rosenberg, F. Vaughan. “Grasshopper: An Orthogonally Persistent Operating System.” Computing Systems 7, 3 (Summer), pp. 289-312. 1994. Matthew D. Welsh, “An Architecture for Highly Concurrent, Well-conditioned Internet Services.” PhD Thesis at UC Berkeley, 2002.


Download ppt "Dave Archer - CS533 - Spring 2006 1 On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham."

Similar presentations


Ads by Google