Extensibility, Safety and Performance in the SPIN Operating System Ashwini Kulkarni Operating Systems Winter 2006.

Slides:



Advertisements
Similar presentations
Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Advertisements

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.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, David Becker, Marc.
Extensibility, Safety and Performance in the SPIN Operating System Department of Computer Science and Engineering, University of Washington Brian N. Bershad,
Extensible Kernels Edgar Velázquez-Armendáriz September 24 th 2009.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
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,
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
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.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
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,
Extensibility, Safety and Performance in the SPIN Operating System Dave Camarillo.
Microkernels: Mach and L4
Presentation of Extensibility, Safety and Performance in the SPIN Operating System Brain N. BershadStefan SavagePrzemyslaw Emin Gun Sirer Marc E.FiuczynskiDavid.
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
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.
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 OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
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?
SPIN: Design Contention between Safety-Extensibility-Performance Review of Extensibility, Safety and Performance in the SPIN Operating System By Lewis.
Protection and the Kernel: Mode, Space, and Context.
Operating System Architectures
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.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
The Performance of Microkernel-Based Systems
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Seungweon Park.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
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.
The Performance of μ-Kernel-Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presenter: Sunita Marathe.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
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.
Processes and Virtual Memory
Full and Para Virtualization
1 Isolating Web Programs in Modern Browser Architectures CS6204: Cloud Environment Spring 2011.
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Tim Hamilton.
MIDORI The Windows Killer!! by- Sagar R. Yeole Under the guidance of- Prof. T. A. Chavan.
Advanced Operating Systems (CS 202) Extensible Operating Systems Jan, 11, 2016.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
CS533 Concepts of Operating Systems Jonathan Walpole.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
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
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
CS533 Concepts of Operating Systems
Presentation by Omar Abu-Azzah
Thomas E. Anderson, Brian N. Bershad,
Advanced Operating Systems (CS 202) Operating System Structure
Presentation transcript:

Extensibility, Safety and Performance in the SPIN Operating System Ashwini Kulkarni Operating Systems Winter 2006

Agenda Introduction Background – Goals and Approach – Motivation to design an extensible OS – Past researches SPIN System Architecture Core Services Provided in SPIN SPIN System Performance Gauge Conclusions

Introduction SPIN – University of Washington Dynamically reconfigurable operating system extensions to meet performance and functionality requirements of applications Match OS implementation & interface to meet application demand – Tune OS to meet application needs E.g. Multimedia applications like streaming video – provide demands that are poorly matched by generic operating systems

Introduction – Goals & Approach Build a general purpose operating system that provides extensibility, safety and good performance Relies on four techniques implemented at the level of the language or its run time. – Co-location – Enforced modularity – Logical protection domains – Dynamic call binding

System Overview SPIN OS consists of set of extension services & core system services – Execute within the Kernel address space Extensions can be loaded into kernel any time Once loaded, integrate themselves into existing infrastructure Provide application specific system services as desired

Motivation Balance generality and specialization – Most OS designed keeping in mind general purpose applications – Need to fine tune system level procedures and functions to better adjust to the needs of the application – Increase application specific system performance Most general systems can be modified (made extensible) to suit specific needs Need to keep system safety in mind. Incorporate solid protection mechanisms.

Motivation, Goals & Approach Generic Operating System Module A Module B Module C Application Specific Extensible modules SafetyPerformance Extensibility

Related work Previous research works demonstrated tensions between extensibility, safety and performance Hydra – allowed applications to manage resources through multi-level policies – System designed with large objects – Large programming effort for small extensions Use of micro-kernels – Exports small no of abstractions including threads, address space and communication channels – Application specific extensions occur at or above the kernel level interface – Needs large modifications even for small extensibility

Related Work “Little Languages” – – Expression of control and data structures cumbersome – Narrow interface between programming environment and rest of the system – Interpretation overhead can limit performance Many systems provide interface to insert arbitrary code into kernel at run-time – Affects system safety and fault tolerance Aegis – efficient trap redirection to export hardware services (exception handling, TLB management) directly to applications – Similar notion to SPIN but different approach SPIN relies on language services only for code extensions within the kernel. – Operating system and programs isolated via virtual address spaces

SPIN Architecture Provides a software infrastructure for safely combining system and application code. Achieved by following two models: Protection model – Capabilities – Protection Domains Extensibility Model

SPIN Safety - Capabilities All kernel resources referenced by capabilities What is a capability? – An unforgeable reference to a resource which can be a system object, an interface or a collection of interfaces – E.g. – a physical page, physical page allocation interface and the virtual memory system respectively Individual resources protected. Only extensions having access to resources can reference them. SPIN implements capabilities directly using pointers, supported by the language. – Compiler, at compile time, prevents a pointer from being forged or dereferenced in a way inconsistent with its type – No significant overhead for using pointers – Maintain a table of type safe references to the kernel level data structures. Grant access to pointer references based on this table.

SPIN Safety – Protection Domain Naming and Protections domains are at language level. Not at virtual memory system level Name space management occurs at language level Protection domains: set of names or program symbols, that can be referenced by code with access to that domain Domains can be intersecting or disjoint enabling applications to share services or define new ones – Domain interfaces (shown in the next slide) Create Resolve Combine

SPIN Safety - Protection Domains

SPIN - Architecture Extension model – Modularity – Event based system. Extensions defined in terms of events and handlers – Multiple handlers can be provided for every event Default handler Other handlers – Event dispatcher would arbitrate on which handler to invoke in response to a flagged event.

SPIN – Extensibility Model REF: Flexible Event Handling for an Extensible Operating System, Przemyslaw Pardyak, OSDI 94, November 1994 Przemyslaw Pardyak

Core Services Memory Management Three basic components of memory management  Physical address service : controls the use and allocation of physical pages.  Virtual address service: Allocates capabilities for virtual addresses  Translation service: Express the relationship between virtual addresses and physical memory Support services like demand-paging, copy-on- write, distributed shared memory, concurrent garbage collection Do not define an address space model directly

SPIN - Core Services SPIN Memory Management Unit / Interface

Core Services: Thread Management User-level threads require knowledge of kernel events Scheduler Activations have high communication overhead due to kernel crossings SPIN: An application can provide its own thread package and scheduler that executes within the kernel

Core Services - Thread Management SPIN defines structure for Implementation of thread model Strands similar to user-level threads, have no kernel context Scheduler multiplexes resources among Strands An Application Specific thread package defines an implementation of the strand Interface for its own threads The Interface : Two events Block, Unblock – raised by kernel to signal changes in strand’s execution state to application-specific Scheduler. Allows implementation of new scheduling policies Scheduler communicates with Thread Package using Checkpoint and Resume

SPIN - Core Services SPIN Thread Management Interface

SPIN – System Performance Gauge System performance based on following four parameters: – Size (extensible module code size) – Micro-benchmarks – Networking – Evaluate extensible modules for networking protocols – End – to – end application performance. SPIN System components: – Sys: extensibility machinery, naming, linking & dispatching – Core: virtual memory management, scheduling services – RT: automatic memory management & exception handling – Lib: standard data structures – lists, queues, hash tables etc – Sal: lower level device drivers and MMU Code Size review of the extensible system components shows that there is no significant effort overhead in making the system extensible using SPIN architecture.

SPIN – System Performance Micro benchmarks: – Overhead of basic system functions like procedure calls, thread management, virtual memory Comparison between DEC OSF/1, Mach and SPIN for “null procedure calls”, thread management & VMM – Reflects cost of only control transfer – Tables below show overhead in micro-seconds Null procedure call Thread Management Virtual Memory Management

SPIN – System Performance Networking – Extensible support for networking protocols Protocol stack that routes incoming network packets to application-specific endpoints within the kernel Ovals represent events raised to route the control to handlers (box representation) Handlers implement labeled protocol Results show increased performance in terms of reduced latency.

Conclusions Possible to achieve Extensible OS support without compromising on system safety Co-location, forced modularity, logical protection domains and dynamic binding allow extensions to be defined / installed dynamically