Extensibility, Safety and Performance in the SPIN Operating System B. N. Bershad, S. Savage, P. Pardyak, E. G. Sirer, M. E. Fiuczyski, D. Becker, C. Chambers,

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Threads, SMP, and Microkernels
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM B. Bershad, S. Savage, P. Pardyak, E. G. Sirer, D. Becker, M. Fiuczynski, C. Chambers,
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, David Becker, Marc.
Background Computer System Architectures Computer System Software.
Extensibility, Safety and Performance in the SPIN Operating System Department of Computer Science and Engineering, University of Washington Brian N. Bershad,
Extensible Kernels: Exokernel and SPIN Presented by Hakim Weatherspoon (Based on slides from Edgar Velázquez-Armendáriz and Ken Birman)
Extensible Kernels Edgar Velázquez-Armendáriz September 24 th 2009.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
G Robert Grimm New York University Opal.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Virtual Memory Virtual Memory Management in Mach Labels and Event Processes in Asbestos Ingar Arntzen.
Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr.
Extensibility, Safety and Performance in the SPIN Operating System Bershad et al Presentation by norm Slides shamelessly “borrowed” from Stefan Savage’s.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
G Robert Grimm New York University Fine-grained Mobility (in Emerald)
Extensibility, Safety and Performance in the SPIN Operating System Dave Camarillo.
G Robert Grimm New York University Fine-grained Mobility (in Emerald)
Presentation of Extensibility, Safety and Performance in the SPIN Operating System Brain N. BershadStefan SavagePrzemyslaw Emin Gun Sirer Marc E.FiuczynskiDavid.
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
PRASHANTHI NARAYAN NETTEM.
Extensible Kernels Mingsheng Hong. OS Kernel Types Monolithic Kernels Microkernels – Flexible (?) – Module Design – Reliable – Secure Extensible Kernels.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
1 Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska and Henry M. Levy Presented by: Karthika Kothapally.
CS533 Concepts of Operating Systems Class 9 Lightweight Remote Procedure Call (LRPC) Rizal Arryadi.
SPIN: Design Contention between Safety-Extensibility-Performance Review of Extensibility, Safety and Performance in the SPIN Operating System By Lewis.
Lightweight Remote Procedure Call (Bershad, et. al.) Andy Jost CS 533, Winter 2012.
Operating System Architectures
Extensibility, Safety and Performance in the SPIN Operating System Ashwini Kulkarni Operating Systems Winter 2006.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Threads and Processes.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Processes Introduction to Operating Systems: Module 3.
A summary by Nick Rayner for PSU CS533, Spring 2006
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
Networking Implementations (part 1) CPS210 Spring 2006.
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
The Mach System Silberschatz et al Presented By Anjana Venkat.
MIDORI The Windows Killer!! by- Sagar R. Yeole Under the guidance of- Prof. T. A. Chavan.
Efficient Software-Based Fault Isolation Authors: Robert Wahbe Steven Lucco Thomas E. Anderson Susan L. Graham Presenter: Gregory Netland.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Introduction to Operating Systems Concepts
Operating Systems CMPSC 473
CS533 Concepts of Operating Systems
Extensible OSes Exokernel and SPIN (Lecture 9, cs262a)
Presentation by Omar Abu-Azzah
Threads, SMP, and Microkernels
Lecture 4- Threads, SMP, and Microkernels
CSE 60641: Operating Systems
Advanced Operating Systems (CS 202) Operating System Structure
CSE 542: Operating Systems
Presentation transcript:

Extensibility, Safety and Performance in the SPIN Operating System B. N. Bershad, S. Savage, P. Pardyak, E. G. Sirer, M. E. Fiuczyski, D. Becker, C. Chambers, S. Eggers Presenter: Judy Fischbach

Contributions New extensible OS system (SPIN) New extensible OS system (SPIN) It allows applications to change OS It allows applications to change OS –Interface –Implementation It uses languages and link-time mechanisms It uses languages and link-time mechanisms –To export fine grain interfaces Type safe language used for extensions Type safe language used for extensions Extensions dynamically linked into OS kernel Extensions dynamically linked into OS kernel

Introduction Desire: To match applications with operating system implementation or interface Desire: To match applications with operating system implementation or interface [Von Eicken et al ’92] [Von Eicken et al ’92] –High performance parallel apps don’t work well with network protocol implementations. [Stonebraker ’81] [Stonebraker ’81] –Database apps perform poorly with disk buffering/paging algorithms in OS

Goals and Approach Spin relies on four techniques: Spin relies on four techniques: –Co-location –Enforced modularity –Logical protection domains –Dynamic call binding The language and runtime provide support for these techniques The language and runtime provide support for these techniques

Goals and Approach Spin relies on four techniques: Spin relies on four techniques: –Co-location –Enforced modularity –Logical protection domains –Dynamic call binding The language and runtime provide support for these techniques The language and runtime provide support for these techniques

SPIN System Overview Executes in kernel’s virtual address space Executes in kernel’s virtual address space Provides a set of extension and core system services Provides a set of extension and core system services Dynamically loads into kernel Dynamically loads into kernel Written in Modula-3 Written in Modula-3

Motivation System structures are not setup well for specialization and can be costly System structures are not setup well for specialization and can be costly Why extensible? Why extensible? –The system can be dynamically be changed to meet needs of a specific application

Related Work Hydra [Wulf et al ’81] Hydra [Wulf et al ’81] Microkernels [Bershad et al ‘90] Microkernels [Bershad et al ‘90] Cross-Domain Communication [Hamilton & Kourgiouris ’93] Cross-Domain Communication [Hamilton & Kourgiouris ’93] “Little Languages” [Lee et al ’94] “Little Languages” [Lee et al ’94] Code install in kernel at runtime [Heidemann & Popek ’94] Code install in kernel at runtime [Heidemann & Popek ’94]

Related Work Hydra [Wulf et al ’81] Hydra [Wulf et al ’81] Microkernels [Bershad et al ‘90] Microkernels [Bershad et al ‘90] Cross-Domain Communication [Hamilton & Kourgiouris ’93] Cross-Domain Communication [Hamilton & Kourgiouris ’93] “Little Languages” [Lee et al ’94] “Little Languages” [Lee et al ’94] Code install in kernel at runtime [Heidemann & Popek ’94] Code install in kernel at runtime [Heidemann & Popek ’94]

Related Work Software Fault Isolation [Wahbe et al ’93] Software Fault Isolation [Wahbe et al ’93] Aegis [Engler et al ’95] Aegis [Engler et al ’95] Systems using language features (like SPIN) to extend operating system services [Cooper et al ’91] Systems using language features (like SPIN) to extend operating system services [Cooper et al ’91]

SPIN Architecture Two Models ProtectionExtension

Protection Model Controls set of operations that can be used with resources Controls set of operations that can be used with resources Capabilites, what are they? Capabilites, what are they? –Definition: An unforged reference to a resource An unforged reference to a resource –Implemented using Pointers –Pointer Definition: A reference to a memory block whose type is defined within an interface A reference to a memory block whose type is defined within an interface

Example: Definition and use of interfaces/capabilities in SPIN ref: Figure 1 of SPIN paper INTERFACE Console; (* An Interface. *) TYPE T <: REFANY; (* Read as “Console.T is opaque” *) CONST InterfaceName = “ConsoleService” (* A global name *) PROCEDURE Open(): T; (* Open returns a capability for the console. *) PROCEDURE Write(t: T; msgs: TEXT); PROCEDURE Read(t: VAR; msg: TEXT); PROCEDURE Close(t: T); END Console; MODULE Console; (* An Implementation module *) (* The implementation of Console.T *) TYPE Buf = ARRAY [0..31] OF CHAR; REVEAL T = BRANDED REF RECORD (* T is a pointer *) inputQ: Buf; (* to a record *) outputQ: Buf; (* device specific info *) END; (* Implementations of interface functions *) (* have direct access to the revealed type *) PROCEDURE Open(): T = … END Console; MODULE Gatekeeper; (* A client *) IMPORT Console; VAR c: Console.T; (* A capability for *) (* the console device *) PROCEDURE IntruderAlert() = BEGIN c := Console.Open(); Console.Write(c, “Intruder Alert”); Console.Close(c); END IntruderAlert; BEGIN END Gatekeeper;

Protection Domains Generally, it is the set of accessible names available to an execution context Generally, it is the set of accessible names available to an execution context But different for SPIN But different for SPIN –Name and protection interface is at language level, not at virtual memory –A protection domain defines the set of names that can be referenced by code with access to that domain

More about Domains Domain can be intersecting or disjoint Domain can be intersecting or disjoint Operations Operations –Create: Initializes domain –Resolve: Matches symbols between target and those exported from source –Combine: Creates linkable namespaces that consist of union of existing domains

Domain Interface ref: Figure 2 of SPIN paper INTERFACE Domain; TYPE T <: REFANY; (* Domain.T is opaque *) PROCEDURE Create (coff:CoffFile.T):T; PROCEDURE CreateFromModule():T; PROCEDURE Resolve(source, target: T); PROCEDURE Combine (d1, d2: T): T; END Domain.

Extension Model Provides Provides –controlled communication between extension and system As an example, extension could… As an example, extension could… –Monitor system activity –Send peformance information to applications Extensions = Events + Handlers Extensions = Events + Handlers

More about Extensions… More about Extensions… Central Dispatcher Extension Registers Event Handler with Event Name Message sent to announce change in system state or To request service Event Primary Implementation Module Other Modules Passes Event Name If allowed, GUARD can be associated with handler Can request to install addl handlers or replace primary handler

SPIN Core Services Extensible Memory Management Extensible Memory Management –Physical storage –Naming –Translation Extensible Thread Management Extensible Thread Management –Strands

Physical Address Service Controls use and allocation of pages Controls use and allocation of pages Allocate event Allocate event –Requests physical memory –Size specified –Optional attributes specified Deallocate event Deallocate event –Given pointer p to memory, frees physical memory Reclaim event Reclaim event –Reclaims a candidate page

Virtual Address Service Allocates capabilities for virtual addresses Allocates capabilities for virtual addresses Capability’s referent has Capability’s referent has –Virtual address –Length –Address Space Identifier Interface has procedures Allocate and Deallocate Interface has procedures Allocate and Deallocate

Translation Service Expresses relationship between virtual address and physical memory Expresses relationship between virtual address and physical memory Interprets 2 references Interprets 2 references –to virtual addresses –to physical addresses Constructs a map between them Constructs a map between them Installs this map in the MMU Installs this map in the MMU

Strands ref: Figure 4 of SPIN paper INTERFACE Strand; TYPE T <: REFANY; (* Strand.T is opaque *) PROCEDURE Block (s:T); PROCEDURE UnBlock(s:T); PROCEDURE Checkpoint(s:T); PROCEDURE Resume (s:T); END Domain.

System Performance Four Perspectives: System Size System Size Microbenchmarks Microbenchmarks Networking Networking End-to-end performane End-to-end performane

System component sizes System component sizes

Microbenchmarks: Protected communication

Microbenchmarks: Thread Management

Microbenchmarks: Virtual Memory

Structure of Network Stacks

Microbenchmarks: Network Latency and Bandwidth Ethernet and ATM applications using UDP/IP for both OSF/1 and SPIN

Microbenchmarks: Network Protocol Forwarding

End to End Performance

Other Issues: Scaling and Dispatch Roundtrip Ethernet latency Roundtrip Ethernet latency –Measures 565 μs 50 GUARDs register interest in UDP pkt and all GUARDs evaluate to false 50 GUARDs register interest in UDP pkt and all GUARDs evaluate to false –Measures 585 μs These same 50 GUARDs evaluate to true These same 50 GUARDs evaluate to true –Measures 637 μs

Other Issues: Automatic Storage Management SPIN uses trace-based mostly-copying garbage collector SPIN uses trace-based mostly-copying garbage collector None of previous measurement benchmarks change if garbage collection disabled None of previous measurement benchmarks change if garbage collection disabled

Other Issues: Extension Sizes

Conclusions SPIN achieves performance, without sacrificing safety SPIN achieves performance, without sacrificing safety Enables an efficient way to extend services along with basic set of core services Enables an efficient way to extend services along with basic set of core services Programming languages with the appropriate feature support can be used to construct future operating systems Programming languages with the appropriate feature support can be used to construct future operating systems