Download presentation
Presentation is loading. Please wait.
1
Hugh Lauer Xerox Corporation Roger Needham Cambridge University Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
2
Key ideas Duality Principle Goals and Approach Message Oriented System Procedure Oriented System Characteristics Duality mapping Similarity of Models Preservation of performance Validation Conclusion References Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
3
Two Broad Categories of OS ◦ Message-oriented System ◦ Procedure-oriented System Most systems biased toward one of these Both have different kinds of primitive operations for managing processes and synchronization. No real operating system exactly fits either model in all respects. Many operating systems have some subsystems that fit one model, and others that fit the other. Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
4
Multiple Processes needs to perform operations on a single data o Data may segregated and be specific to a process (message oriented) o Data is shared in the common address space shared by all processes (procedure oriented in kernel space) Need to avoid race condition allow process synchronization At the time of paper, there were two camps arguing which is best- message oriented/ procedure oriented The paper proposes both are equivalent and dual to each other Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
5
When values and operations can be paired up in a way that leaves everything important unchanged when all pairs are switched simultaneously, we call the members of each pair dual to each other. The primitive operations of message oriented and procedure oriented systems can be swapped simultaneously preserving the logic and performance of a program. Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
6
To demonstrate that These two categories are duals of each other- Constructs have direct counterparts The dual programs are logically identical to each other Performance is identical in both systems given identical scheduling strategies Neither system is inherently better than the other Choice of model is based on constraints imposed by machine architecture and hardware Empirical approach Observation,classification of properties, generalization and construction of abstract models Informal reasoning, empirical support Conclusion about the class of objects Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
8
Small number of, static big processes, often no sharing of address spaces -data references passed in messages Process Declaration consists of Local data and algorithms, Message ports, Message channels for other processes. Explicit messages for communication o Destination (Message Channels) o Queuing messages at destination processes (Message Ports) Primitive operations for message transmission SendMessage, AwaitReply, WaitForMessage, SendReply Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
9
Specific communication paths Static number of processes and the connections between them - Deletion, creation and changing connections of processes difficult because of queuing. Process tends to operate in a relatively static context. Processes rarely share data in memory. Similar to event handling mechanism: where events are handled synchronous with the program flow. Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
10
Synchronization achieved by o Processes queues for congested resources in message queues attached to the processes associated with those resources. o Process access data only when it is processing a message referring to it. Does not manipulate it after it is passed on in a message to another process. Control of peripheral devices by sending messages Priorities are statically assigned Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
11
Message oriented system Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
12
Process 3 Process 2 Process 4 Process 1 Data Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
13
Process 3 Process 2 Process 4 Process 1 Data Message port1 Message port2 Message port3 Processes have message ports to receive messages in queue Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
14
Process 3 Process 2 Process 4 Process 1 Data Each process has its own data. A process operates on data contained by another process by means of explicit message passing mechanism Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
15
Process 3 Process 2 Process 4 Process 1 Data Wait for Message() The process containing the data receives request in the form of message. All processes waits for Requests from other Processes in all its ports. Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
16
Process 3 Process 2 Process 4 Process 1 Data SendMessage() Process 3 sends Request for Process 1 Data. The request is Queued in the message Port of process1 Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
17
Process 3 Process 2 Process 4 Process 1 Data SendReply() AwaitReply() The data is operated by the algorithm defined for that port which received the message Result is sent back The requesting process can either block (synchronous)/ resume its operation (asynchronous) Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
18
Process 3 Process 2 Process 4 Process 1 Data Process 1 processes next message in the queue Similar to Event handler mechanism All process processes only one message at a time. Thus synchronization is achieved!. Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
20
Procedure o Contains Algorithms, local data, parameters, results Procedure call o Synchronous: the calling procedure blocks until the called procedure returns o Asynchronous: the calling procedure continues execution along with the called procedure fork procedureName(parameterList) Returns processID join processID Returns (resultsList) Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
21
Characterized by a protection and addressing mechanism for procedure call facility Large number of small processes (threads), easy creation and deletion of processes as there are no communication channels. Communication by means of direct sharing and locking of data. Little or no direct communication. Similar to multithreaded environment- processes share memory in kernel space Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
22
Process Synchronization achieved by locks, semaphores or monitors. Congested resources result in processes blocking while waiting on monitor locks or condition variables Data is shared between processes Peripherals are controlled by locks and shared memory Processes have dynamic priorities Global naming scheme often used Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
23
Module is primitive unit of compilation containing Procedures and Data A monitor is a special kind of module that has private data and procedures, protected with a lock. Processes must acquire the lock when they call an entry procedure (a procedures which can be called from outside the monitor). Only one process can operate inside the monitor at a time. Can be instantiated using NEW and START statements. Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
24
Provides flexible synchronization among events than mutual exclusion Has associated with it a queue of processes Two operations: ◦ wait conditionVariable ◦ signal conditionVariable Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
25
Procedure oriented system Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
26
Monitor has global data representing the state information for the resource Number of procedure declarations representing the different services offered. Attribute ENTRY used to seizing the monitor lock Only means of interaction among its components is procedural Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
27
Global Data Condition Variable Monitor NEW/ START Global Data is shared across multiple processes Monitor encapsulates the data and methods and provides synchronized data access Proce ss1 Proce ss2 Proce ss3 Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
28
Global Data Condition Variable Monitor NEW/ START Proce ss1 Proce ss2 Proce ss3 A process should first acquire mutex for data, and then perform its operations. Procedure CALL Locked by proc 1 Any other process requesting for mutex is queued. No other process is allowed to access the data if its locked Procedure can wait (synchronous) Or proceed with its operations (asynchronous) Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
29
Global Data Condition Variable Monitor NEW/ START Proce ss1 Proce ss2 Proce ss3 Procedure CALL Algorithm for Procedure 1 if Resource Exhausted then WAIT C the process waits until some other process SIGNAL C Procedure 1 wakes up when data Is ready and Finishes Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
30
Global Data Condition Variable Monitor NEW/ START Proce ss1 Proce ss2 Proce ss3 Process 1 releases the mutex Unlocked by proc 1 Next process in the queue is scheduled. The data is operated by one process at a time Thus Synchronization is achieved! Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
31
Of both Systems Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
32
Message-oriented Process, CreateProcess Message channels/ports SendMessage/AwaitReply (immediate) SendMessage/AwaitReply (delayed) SendReply Main loop of standard resource manager, WaitFor Message statement, case statement Arms of the case statement Waiting for messages Procedure-oriented Monitors, NEW/START External Procedure identifiers ENTRY Procedure call FORK/JOIN RETURN (from procedure) monitor Lock, ENTRY attribute ENTRY procedure declarations Condition variables, WAIT, SIGNAL Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
33
Process, CreateProcess Monitors, NEW/START External Message channels/ports Procedure identifiers ENTRY SendMessage/AwaitReply (immediate) Procedure call SendMessage/AwaitReply (delayed) FORK/JOIN SendReply RETURN (from procedure) Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
34
Main loop WaitFor Message statement, case statement Lock, ENTRY attribute Arms of the case statement (which port) ENTRY procedure declarations (which procedure) Waiting for messages WAIT, SIGNAL Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
35
A system constructed with the primitives defined by one model can be mapped directly into a dual system, which fits the other model. A client program written for one system can be transformed for the other system by replacing the primitives from the first model with the primitives of the other. Logic of program not affected by transformation ◦ None of the important parts are touched or rearranged ◦ The semantic component is invariant ◦ Only the syntax of primitives varies Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
36
Three important elements that affect performance Execution time Computational load Queuing and Wait times The duality mapping doesn’t modify the main bodies of the programs Speed of execution of a single program is same Number of additions, multiplications, comparisons are same So the amount of computing power is same In a suite, the way in which the executions of those programs interact with others is same Process wait time is same Life time of computation is same Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
37
No formal proof Mixed acceptance among a (biased) peer community Only one citable case: Cambridge CAP computer ◦ Originally message-oriented ◦ Switched to process-oriented, with little change No attempt is made to rigorously prove their assertions Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
38
No inherent differences between the models Choose model based on ◦ Machine architecture ◦ Programming environment Both systems has its own merits, and it cannot be said one is better than the other. Eliminates some degrees of freedom in the design process This property of equivalence between two categories of operating system can be used in effective implementation of OS on a particular architecture based on performance calculation beforehand. Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
39
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. Thanks to Elizabeth Keniston CS 533 - Winter2009 http://en.wikipedia.org/wiki/Event_(computing) http://en.wikipedia.org/wiki/Event_(computing) http://en.wikipedia.org/wiki/Message_passing http://en.wikipedia.org/wiki/Message_passing http://en.wikipedia.org/wiki/Interprocess_communication http://en.wikipedia.org/wiki/Interprocess_communication http://en.wikipedia.org/wiki/Fork_(operating_system) http://en.wikipedia.org/wiki/Fork_(operating_system) http://web.cecs.pdx.edu/~harry/Blitz/InstructorInfo/IdeasOnHo areTask.pdf http://web.cecs.pdx.edu/~harry/Blitz/InstructorInfo/IdeasOnHo areTask.pdf http://en.wikipedia.org/wiki/Monitor_(synchronization) http://en.wikipedia.org/wiki/Monitor_(synchronization) http://en.wikipedia.org/wiki/Monitor_(synchronization) http://en.wikipedia.org/wiki/Monitor_(synchronization) http://en.wikipedia.org/wiki/Duality_principle_(boolean_algebra) #Duality_principle http://en.wikipedia.org/wiki/Duality_principle_(boolean_algebra) #Duality_principle Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.