The Structuring of Systems Using Upcalls David D. Clark Presenter: Haitham Gad.

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
User-Level Interprocess Communication for Shared Memory Multiprocessors Bershad, B. N., Anderson, T. E., Lazowska, E.D., and Levy, H. M. Presented by Akbar.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Multiple Processor Systems
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
Chapter 7 Protocol Software On A Conventional Processor.
CS533 Concepts of Operating Systems Class 20 Summary.
CS533 Concepts of Operating Systems Class 5 System Structuring using Layers & Micro-Kernel Based OSs.
The Structuring of Systems Using Upcalls David D Clark Presented by: Prassnitha Sampath.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
CS533 Concepts of Operating Systems Class 7 System Structuring using Layers and Micro-kernels.
CS533 Concepts of Operating Systems Class 11 System Structuring using Layers.
Middleware Technologies compiled by: Thomas M. Cosley.
USER LEVEL INTERPROCESS COMMUNICATION FOR SHARED MEMORY MULTIPROCESSORS Presented by Elakkiya Pandian CS 533 OPERATING SYSTEMS – SPRING 2011 Brian N. Bershad.
CS533 Concepts of Operating Systems Class 8 System Structuring using Layers.
Ralf Juengling Portland State University The Structuring of Systems using Upcalls David D. Clark, “The Structuring of Systems using Upcalls”, Proc. of.
The Structuring of Systems Using Upcalls David D. Clark 4/26/20111Frank Sliz, CS533, Upcalls.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
The Structuring of Systems Using Upcalls Paper by David D. Clark Presentation by Emerson Murphy-Hill.
PRASHANTHI NARAYAN NETTEM.
.NET Mobile Application Development Remote Procedure Call.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
Fundamentals of Python: From First Programs Through Data Structures
CS510 Concurrent Systems Jonathan Walpole. Lightweight Remote Procedure Call (LRPC)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Protocol Architectures. Simple Protocol Architecture Not an actual architecture, but a model for how they work Similar to “pseudocode,” used for teaching.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
CS533 Concepts of Operating Systems Jonathan Walpole.
Implementing Remote Procedure Calls Authored by Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presented by Lars Larsson.
Distributed Garbage Collection for Network Objects Presented by Olga Convey Systems Research Center © Digital Equipment Corporation Algorithm by Andrew.
Chapter 2: System Models. Objectives To provide students with conceptual models to support their study of distributed systems. To motivate the study of.
SEMINOR. INTRODUCTION 1. Middleware is connectivity software that provides a mechanism for processes to interact with other processes running on multiple.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 4.
Distributed Computing A Programmer’s Perspective.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy. Presented by: Tim Fleck.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
The Mach System Silberschatz et al Presented By Anjana Venkat.
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.
Microkernel Systems - Jatin Lodhia. What is Microkernel A microkernel is a minimal computer operating system kernel which, in its purest form, provides.
CS533 - Concepts of Operating Systems 1 Threads, Events, and Reactive Objects - Alan West.
Implementing Remote Procedure Calls Andrew D. Birrell and Bruce Jay Nelson 1894 Xerox Palo Alto Research Center EECS 582 – W16.
Copyright © 2004, Keith D Swenson, All Rights Reserved. OASIS Asynchronous Service Access Protocol (ASAP) Tutorial Overview, OASIS ASAP TC May 4, 2004.
Presented by: JungChun Lu. Goal Propose a design methodology suitable for operating system programs which: Permits synchronous procedure call between.
MULTIPROCESSING MODULE OF PYTHON. CPYTHON  CPython is the default, most-widely used implementation of the Python programming language.  CPython - single-threaded.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
The Structuring of Systems Using Upcalls By David D. Clark Presented by Samuel Moffatt.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
The Structuring of Systems Using Upcalls David D. Clark (Presented by John McCall)
Kernel Design & Implementation
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
CS533 Concepts of Operating Systems
The Structuring of Systems Using Upcalls David D. Clark
Multithreading Chapter 23.
Sarah Diesburg Operating Systems COP 4610
Structuring Of Systems Using Upcalls - By David D. Clark
Presented by Neha Agrawal
CS533 Concepts of Operating Systems Class 11
Structuring of Systems using Upcalls
U Layered Architecture M There are up-calls and down-calls. L.
Presentation transcript:

The Structuring of Systems Using Upcalls David D. Clark Presenter: Haitham Gad

Layered Program Structure Layering is a program structure proposed for usage in operating systems and network protocols. System functions are organized as layers. Upper layers are thought of as clients to lower layers (lower layers provide services to upper layers). Acyclic dependency relationship among layers enhances modularity and facilitates verification. Layering is a program structure proposed for usage in operating systems and network protocols. System functions are organized as layers. Upper layers are thought of as clients to lower layers (lower layers provide services to upper layers). Acyclic dependency relationship among layers enhances modularity and facilitates verification.

Layered Program Structure Layers are traditionally implemented in the form of OS processes (or threads). Service invocation occurs from the top down through subroutine calls (probably RPC). Upward flow of control, when needed, is implemented using interprocess communication signals. This methodology, however, leads to serious performance and code complexity problems. Layers are traditionally implemented in the form of OS processes (or threads). Service invocation occurs from the top down through subroutine calls (probably RPC). Upward flow of control, when needed, is implemented using interprocess communication signals. This methodology, however, leads to serious performance and code complexity problems.

Motivation for Upcalls In a layered program structure, the natural flow of control is often upward not downward. In a process-based layer implementation, upward flow of control is inefficient due to: - The need for data buffering mechanisms; - The need for interprocess signals. Upward flow of control requires contaminating layer code with a lot of communication code. In a layered program structure, the natural flow of control is often upward not downward. In a process-based layer implementation, upward flow of control is inefficient due to: - The need for data buffering mechanisms; - The need for interprocess signals. Upward flow of control requires contaminating layer code with a lot of communication code.

Multi-task Modules A layer is organized as subroutines that live in a number of tasks. Invocation across layer boundaries is done only through subroutine calls. Shared state among subroutines is managed by a monitor lock. The group of collaborating subroutines from different tasks are called a multi-task module. A layer is organized as subroutines that live in a number of tasks. Invocation across layer boundaries is done only through subroutine calls. Shared state among subroutines is managed by a monitor lock. The group of collaborating subroutines from different tasks are called a multi-task module.

Multi-task Modules Intertask communication can only be used within a layer.

Intra-layer Signal Example: Remote Login Service (Reception) DowncallUpcall Intra-layer Signal Upcall

Arming Downcall Upcall Intra-layer Signal Example: Remote Login Service (Sending) Downcall

Advantages of Upcalls Efficiency: Due to the usage of synchronous subroutine calls instead of asynchronous IPC signals for interlayer communication. Simplicity: - No data buffering needed; - Easier for lower layers to “ask advice” of upper layers. “Piggybacking” occurs naturally in outgoing packets. Efficiency: Due to the usage of synchronous subroutine calls instead of asynchronous IPC signals for interlayer communication. Simplicity: - No data buffering needed; - Easier for lower layers to “ask advice” of upper layers. “Piggybacking” occurs naturally in outgoing packets.

Advantages of Multi-task Modules Programmers deal with subroutine interfaces instead of IPC interfaces. Decisions about how tasks are used can be made late in the design process. Programmers deal with subroutine interfaces instead of IPC interfaces. Decisions about how tasks are used can be made late in the design process.

Problems and Solutions Problem: Upcalls break the “depends on” relationship established by layering. If a client fails, all other clients are in risk of failure too. Solution: Make sure data shared among the upcall clients (upper layer instances) is consistent and unlocked before invoking the upcall. Problem: Upcalls break the “depends on” relationship established by layering. If a client fails, all other clients are in risk of failure too. Solution: Make sure data shared among the upcall clients (upper layer instances) is consistent and unlocked before invoking the upcall.

Problems and Solutions Problem: In case of a failure, the task that invoked the upcall has to be recovered or terminated, which could be a problem in case the task is responsible for a precious resource. Solution: Make tasks expendable (separate tasks for upcalling each client). Problem: In case of a failure, the task that invoked the upcall has to be recovered or terminated, which could be a problem in case the task is responsible for a precious resource. Solution: Make tasks expendable (separate tasks for upcalling each client).

Problems and Solutions Problem: In case of a client failure, per-layer resources have to be freed up. Solution: Provide layer-specific cleanup functions that the system upcalls in case a client fails. Problem: Infinite loops cannot be distinguished from long-running computations. Solution: Leave the decision to a timer. Problem: In case of a client failure, per-layer resources have to be freed up. Solution: Provide layer-specific cleanup functions that the system upcalls in case a client fails. Problem: Infinite loops cannot be distinguished from long-running computations. Solution: Leave the decision to a timer.

Problems and Solutions Problem: Indirect recursive upcalls. Solutions: - Put layer’s variables in a consistent state before initiating the upcall; - Prohibit recursive downcalls; - Downcalls to queue work requests for later execution by the task holding the lock; Problem: Indirect recursive upcalls. Solutions: - Put layer’s variables in a consistent state before initiating the upcall; - Prohibit recursive downcalls; - Downcalls to queue work requests for later execution by the task holding the lock;

Problems and Solutions Problem: Indirect recursive upcalls. Solutions: - Downcalls to do nothing but set flags that are checked at known times by other tasks including the task making the upcall; - For upcalls triggering the same downcall, replace the downcall by extra return artuments or another upcall to query the client. Problem: Indirect recursive upcalls. Solutions: - Downcalls to do nothing but set flags that are checked at known times by other tasks including the task making the upcall; - For upcalls triggering the same downcall, replace the downcall by extra return artuments or another upcall to query the client.

Swift The authors developed the swift system based on the concepts of upcalls and multi-task modules. Swift is written in a typesafe high-level language inside a single shared address space with threads representing tasks of a multi-task module. According to the authors, experiments on their system showed performance improvements by a factor of five to ten over process-based layering. The authors developed the swift system based on the concepts of upcalls and multi-task modules. Swift is written in a typesafe high-level language inside a single shared address space with threads representing tasks of a multi-task module. According to the authors, experiments on their system showed performance improvements by a factor of five to ten over process-based layering.

Conclusions Layering is a program structure that enhances modularity and facilitates verification. Mapping layers onto processes is a bad idea. Upcalls and multi-task modules provide a more efficient and simpler interface to layered architectures. Upcalls programming methodology imposes a new range of problems that need to be carefully dealt with. Layering is a program structure that enhances modularity and facilitates verification. Mapping layers onto processes is a bad idea. Upcalls and multi-task modules provide a more efficient and simpler interface to layered architectures. Upcalls programming methodology imposes a new range of problems that need to be carefully dealt with.