The Structuring of Systems Using Upcalls David D. Clark 4/26/20111Frank Sliz, CS533, Upcalls.

Slides:



Advertisements
Similar presentations
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
Advertisements

Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
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.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
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.
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.
CS533 - Concepts of Operating Systems
Ralf Juengling Portland State University The Structuring of Systems using Upcalls David D. Clark, “The Structuring of Systems using Upcalls”, Proc. of.
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
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 David D. Clark Presenter: Haitham Gad.
The Structuring of Systems Using Upcalls Paper by David D. Clark Presentation by Emerson Murphy-Hill.
CS211/Fall /06 Outline for This Lecture Application of e2e over wireless Application Level Framing Integrated Layer Processing Course Project Introduction.
CS510 Concurrent Systems Jonathan Walpole. Lightweight Remote Procedure Call (LRPC)
Stack Management Each process/thread has two stacks  Kernel stack  User stack Stack pointer changes when exiting/entering the kernel Q: Why is this necessary?
Feb 20, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Protocol Layering Chapter 10. Looked at: Architectural foundations of internetworking Architectural foundations of internetworking Forwarding of datagrams.
Protocol Architectures. Simple Protocol Architecture Not an actual architecture, but a model for how they work Similar to “pseudocode,” used for teaching.
LiNK: An Operating System Architecture for Network Processors Steve Muir, Jonathan Smith Princeton University, University of Pennsylvania
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
CS533 Concepts of Operating Systems Jonathan Walpole.
Heterogeneous Multikernel OS Yauhen Klimiankou BSUIR
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_b Protocol Layering Instructor: Dr. Li-Chuan Chen Date: 09/15/2003 Based in part upon slides of Prof.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
03 - Winter 2006ECE 766 Computer Interfacing and Protocols 1 Protocol Hierarchies First networks: hardware comes first Increased complexity  network architecture.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-4 Process Communication Department of Computer Science and Software.
Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy. Presented by: Tim Fleck.
Chapter 2 Network Models
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
The Mach System Silberschatz et al Presented By Anjana Venkat.
1 Chap. 2 Protocol. 2 Communication model Simplified communication model  source node  gather data from sensor or switch using ADC (analog-to-digital.
Operating-System Structures
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.
Protocol Layering Chapter 11.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
August 13, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 11: Multiprocessors: Uniform Memory Access * Jeremy R. Johnson Monday,
Chapter – 8 Software Tools.
Presented by: JungChun Lu. Goal Propose a design methodology suitable for operating system programs which: Permits synchronous procedure call between.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
The Structuring of Systems Using Upcalls By David D. Clark Presented by Samuel Moffatt.
The Structuring of Systems Using Upcalls David D. Clark (Presented by John McCall)
Communication in Distributed Systems. . The single most important difference between a distributed system and a uniprocessor system is the interprocess.
Computer System Structures
Kernel Design & Implementation
Topics Covered What is Real Time Operating System (RTOS)
Chap. 2 Network Models.
Presented by Muhammad Abu Saqer
CS533 Concepts of Operating Systems
The Structuring of Systems Using Upcalls David D. Clark
CIS 321 Data Communications & Networking
Software models - Software Architecture Design Patterns
Fast Communication and User Level Parallelism
Structuring Of Systems Using Upcalls - By David D. Clark
Operating Systems Lecture 1.
Presented by: SHILPI AGARWAL
CS533 Concepts of Operating Systems Class 11
Structuring of Systems using Upcalls
Computer Networking A Top-Down Approach Featuring the Internet
Presentation transcript:

The Structuring of Systems Using Upcalls David D. Clark 4/26/20111Frank Sliz, CS533, Upcalls

Overview A method for implementing layers with synchronous procedure calls between layers Upcalls – flow of control by a lower layer calling an upper layer via procedure call Multi-task module – subroutines in different tasks that make up the layer 4/26/2011Frank Sliz, CS533, Upcalls2

Outline Background Upcalls and Multi-task Modules Example Advantages Swift Operating System Problems Conclusions 4/26/2011Frank Sliz, CS533, Upcalls3

Background 1968 – THE operating system Great interest in using layers to structure OS 1982 – ISO model for network communication 1985 – Swift operating system 4/26/2011Frank Sliz, CS533, Upcalls4

Monolithic Operating System 4/26/2011Frank Sliz, CS533, Upcalls5

Layered Operating System 4/26/2011Frank Sliz, CS533, Upcalls6

Advantages of Layered OS Modularity Easier to test and debug Easier to modify Acyclic dependency Verification Trustworthiness 4/26/2011Frank Sliz, CS533, Upcalls7

7-Layer OSI Model 4/26/2011Frank Sliz, CS533, Upcalls8 application presentation session transport network data link physical

Disadvantages of Layered OS Performance – Asynchronous communication between layers – Buffering of data between layers – Copying of data for crossing protection boundary – Programming complexity Inefficient support for upward flow of control 4/26/2011Frank Sliz, CS533, Upcalls9

Upcalls and Multi-Task Modules Upcalls – Flow of control by a lower layer calling an upper layer via procedure call Multi-Task Modules – Subroutines in different tasks that make up the layer – Subroutines are callable from above or below via procedure calls – State variables in shared memory 4/26/2011Frank Sliz, CS533, Upcalls10

System Organization 4/26/2011Frank Sliz, CS533, Upcalls11

Example - Network Protocol 3 Layers and 3 Tasks 4/26/2011Frank Sliz, CS533, Upcalls12 Display Transport Network CreateReceiveSend

Control Flow in Network Protocol 4/26/2011Frank Sliz, CS533, Upcalls13 Transport Layer Display Layer Network Layer

Example - Display Layer Network Protocol 4/26/2011Frank Sliz, CS533, Upcalls14

Example - Transport Layer Network Protocol 4/26/2011Frank Sliz, CS533, Upcalls15

Example Network Layer Network Protocol 4/26/2011Frank Sliz, CS533, Upcalls16

Example – Create Task 4/26/2011Frank Sliz, CS533, Upcalls17

Example – Receive Task 4/26/2011Frank Sliz, CS533, Upcalls18

Example – Send Task 4/26/2011Frank Sliz, CS533, Upcalls19

Advantages of Upcalls Upward, synchronous flow via procedure call is more efficient than IPC No need for data buffering between layers Simplicity of implementation Lower layer can ask advice from upper layer resulting in simplification of algorithm 4/26/2011Frank Sliz, CS533, Upcalls20

Advantages of Multi-Task Modules Subroutine interfaces are easier to deal with than IPC interfaces No system wide IPC message format needed Decisions about task usage can be made later, the tasks are not hard coded into the layers Acknowledgements can be sent with new data packet - Piggybacking 4/26/2011Frank Sliz, CS533, Upcalls21

Swift Operating System Explore upcall and multi-module usage Single address space with a typesafe language Monitor locks for access to shared state Initially used for network protocols Test to determine if useful in other contexts Develop solutions for upcall problems 4/26/2011Frank Sliz, CS533, Upcalls22

Problems with Upcall Violates basic principle of layering – upcall failure could leave lower layer left in unstable condition Recovery of resources when an upcall fails Upcall gets into an infinite loop 4/26/2011Frank Sliz, CS533, Upcalls23

Mitigating Upcall Failures 2 classes of data – Client or private data which is expendable – Data shared between tasks must be unlocked and consistent before upcall Expendable tasks Layer-specific cleanup via system procedures Timer or User to detect infinite loop 4/26/2011Frank Sliz, CS533, Upcalls24

Solutions to Indirect Recursive Call Put state variables in consistent state before upcall and then reevaluate them upon return Prohibit recursive downcall – variables can be left locked and inconsistent when upcalling Downcall queues the work for later execution Downcall is restricted in its actions Downcall is replaced by extra arguments or it is replaced by a second upcall to query 4/26/2011Frank Sliz, CS533, Upcalls25

Problems with Multi-Task Modules Failure to use monitor locks properly which can cause incorrect results With single shared memory address space program bugs can corrupt memory Need queues for suspended tasks waiting to obtain monitor locks 4/26/2011Frank Sliz, CS533, Upcalls26

Conclusions Methodology is useful for operating systems – upcalls and multi-task modules are efficient – Strongly checked typesafe language should be used in a single shared address space – useful for network protocols, text editors, and I/O Bad idea to implement a layer as a process Parallel systems need shared memory for efficient communication between processes 4/26/2011Frank Sliz, CS533, Upcalls27