Modern Systems: Extensible KERNELS AND containers

Slides:



Advertisements
Similar presentations
Northwestern University 2007 Winter – EECS 443 Advanced Operating Systems Exokernel: An Operating System Architecture for Application-Level Resource Management.
Advertisements

CS533 Concepts of Operating Systems Class 14 Virtualization and Exokernels.
Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
XEN AND THE ART OF VIRTUALIZATION Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, lan Pratt, Andrew Warfield.
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Xen , Linux Vserver , Planet Lab
Exokernel: An Opertion System Architecture for Application-Level Resource Management SIGCOMM ’ 96, PDOS-MIT Presented by Ahn Seunghoon Dawson R. Engler,
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.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
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
Dawson Engler, Frans Kaashoek, James O’Toole
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
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.
M. Frans Kaashoek, Dawson R. Engler, Gregory R. Ganger, Hector M. Bricefio, Russell Hunt, David Mazikres, Thomas Pinckney, Robert Grimm, John Jannotti.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Operating System Architectures
APPLICATION PERFORMANCE AND FLEXIBILITY ON EXOKERNEL SYSTEMS M. F. Kaashoek, D. R. Engler, G. R. Ganger H. M. Briceño, R. Hunt, D. Mazières, T. Pinckney,
Paper by Engler, Kaashoek, O’Toole Presentation by Charles Haiber.
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Jonathan Walpole (based on a slide set from Vidhya Sivasankaran)
CS533 Concepts of Operating Systems Jonathan Walpole.
Operating System Architectures
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Exokernel: An Operating System Architecture for Application-Level Resource Management" by Dawson R. Engler, M. Frans Kaashoek, and James O'Toole Jr. Chris.
Processes Introduction to Operating Systems: Module 3.
MIT’s Exokernel Presented by Victoria Barrow Kyle Safford Sean Sommers.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
4-Dec-15CSE 60641: Operating Systems1 -Exokernel: an operating system architecture for application-level resource management. Dawson R. Engler, M. Frans.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
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.
Overview of the MIT Exokernel Operating System James Madison University CS 450 Abzug MWF 10:10-11:00 12/2/02 Steven Petzinger Billy Lehner.
Full and Para Virtualization
Advanced Operating Systems (CS 202) Extensible Operating Systems Jan, 11, 2016.
CS533 Concepts of Operating Systems Jonathan Walpole.
Advanced Operating Systems (CS 202) Extensible Operating Systems (II) Jan, 13, 2016.
Exokernel: An Operating System Architecture for Application-Level Resource Management By Dawson R. Engler, M. Frans Kaashoek, James O’Toole Jr. Presented.
Exokernel Operating System: An Introduction Liming Shu COSC 513, Summer 2002.
MICROKERNELS: MACH AND L4 Hakim Weatherspoon CS
Exokernel: An Operating System Architecture for Application-Level Resource Management by Dawson R. Engler, M. Frans Kaashoek, and James O'Toole Jr. Presented.
Introduction to Operating Systems Concepts
Operating System Structures
Kernel Design & Implementation
Xen and the Art of Virtualization
Non Contiguous Memory Allocation
Microkernels: mach and L4
Container-based Operating System Virtualization: A scalable, High-performance Alternative to Hypervisors Stephen Soltesz, Herbert Potzl, Marc E. Fiuczynski,
The Mach System Sri Ramkrishna.
Session 3 Memory Management
Presentation by Omar Abu-Azzah
Operating System Structure
OS Virtualization.
Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr [SOSP’97]
The Multikernel A new OS architecture for scalable multicore systems
Chapter 2: Operating-System Structures
Outline Chapter 2 (cont) OS Design OS structure
CS533 Concepts of Operating Systems Class 16
EXOKERNEL Gabriel Beltran John Blackman David Martin Kurt Rohrbacher
Presented by: SHILPI AGARWAL
Operating Systems Structure
Chapter 2: Operating-System Structures
Modern systems: Extensible Kernels and Containers
Microkernels: mach and L4
Advanced Operating Systems (CS 202) Operating System Structure
Lecture Topics: 11/1 Hand back midterms
Presentation transcript:

Modern Systems: Extensible KERNELS AND containers Shannon Joyner Modern Systems: Extensible KERNELS AND containers

Motivation Applications must conform to operating system interface One operating system implementation is not ideal for everyone Cannot optimize for a given application OSs did not work well for database management systems 1 1 Operating System Support for Database Management. Michael Stonebraker. Communications of the ACM.

Motivation Operating systems are complex Accessing resources require many system calls 1 This complexity in UNIX lead to Mach Give application more control over system 1 Mach: A New Kernel Foundation for UNIX Development. Mike Acetta et al. https://pdos.csail.mit.edu/archive/exo/exo-slides/sld001.htm

Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T. Laboratory for Computer Science Proc. 15th ACM Symposium on Operating Systems Principles (SOSP). Pages 251-266.

Exokernel GOALS Make small, fast kernel implementation by implementing simple primitives Secure, fast way to access hardware resources System abstractions can be implemented efficiently by application Applications can have fast, specialized implementations System abstractions (interface to hardware)

Exokernel LibOS Secure Bindings TLB Exokernel Say how exokernel will try to address goals Exokernel, Figure 1

Library Operating Systems Implements OS besides interaction with hardware1 Customize based on application needs Manages resource policies Example LibOS customizations Virtual Memory Scheduling Networking Each instance of a LibOS can do a completely different thing. The LibOS needs way to access resources such as memory and disk Resource policy: How much CPU time does each process receive? Exokernel, Figure 1 1 http://www.cs.cornell.edu/courses/cs6410/2010fa/lectures/08-extensible-kernels.pdf

Secure bindings Used by LibOSes to access resources Provides connection to resource Decouples authorization from use of resource Hardware can implement protection checks quickly When an application wants access to a resource, the secure binding provides a connection. If the application needs to access the resource a lot, making a connection every time, which can be expensive Exokernel, Figure 1

SOFTWARE Translation look-ASIDE buffer (tlb) Caches virtual memory to physical memory translations Cache secure bindings in TLB to reduce number of binding connections Improves performance Software TLB used to cache bindings. Software TLB Exokernel, Figure 1

Exokernel Only handles resource sharing Rest left to application Does not handle resource polices Exokernel, Figure 1

Exokernel Make small, fast kernel implementation by implementing simple primitives Exokernel Secure, fast way to access hardware resources TLB + Secure Bindings System abstractions can be implemented efficiently by application LibOS + Exokernel Applications can have fast, specialized implementations LibOS So for each goal, say which part of exokernel accomplishes task on next slide

Implementation Aegis: Exokernel Processor Time Slices Exceptions Protected Control Transfer (PCT) Dynamic Packet Filter (DPF) Processor Time Slices: Scheduling done by iterating through slices Exceptions: Sends hardware exceptions to applications Protected Control Transfer: A way to switch to another processor Asynchronous: Donate rest of the time slice to the next processor. Synchronous: Donate the current time slice and any future time slice. Dynamic Packet Filtering: -Need to determine which application to send a packet to -Application installs logic on the kernel at runtime Exokernel, Dispatch Exceptions, Table 5

Implementation ExOS: LibOS Interprocess communication Application Specific Safe Handlers Virtual Memory IPC abstractions -Give up time slice if write buffer is full or read buffer is empty ASH-application level message handlers: ExOS cannot secure map the network buffers to application space. Download code to kernel. Way to quickly perform checksums and respond to messages. Virtual Memory: Provides application level VM with low overhead Exokernel, Figure 2

Questions Who handles resource policies? Is there a problem with how exokernels handle resource policies? Why do we need secure bindings? Application does. Poor Isolation, conflicting policies. Protection / authorization of resources. Faster to do at kernel level, but kernel does not need to understand resources. Not enough space in the hardware TLB. Can make software TLB larger.

Questions Who handles resource policies? Is there a problem with how exokernels handle resource policies? Why do we need secure bindings? Application does. Poor Isolation, conflicting policies. Protection / authorization of resources. Faster to do at kernel level, but kernel does not need to understand resources. Not enough space in the hardware TLB. Can make software TLB larger.

Questions Who handles resource policies? Application handles resource policies. Application does. Poor Isolation, conflicting policies. Protection / authorization of resources. Faster to do at kernel level, but kernel does not need to understand resources. Not enough space in the hardware TLB. Can make software TLB larger.

Questions Who handles resource policies? Is there a problem with how exokernels handle resource policies? Why do we need secure bindings? Application does. Poor Isolation, conflicting policies. Protection / authorization of resources. Faster to do at kernel level, but kernel does not need to understand resources. Not enough space in the hardware TLB. Can make software TLB larger.

Questions Who handles resource policies? Is there a problem with how exokernels handle resource policies? Poor isolation. Applications can have conflicting policies. Why do we need secure bindings? Why does Exokernel use a software TLB instead of the hardware TLB? Application does. Poor Isolation, conflicting policies. Protection / authorization of resources. Faster to do at kernel level, but kernel does not need to understand resources. Not enough space in the hardware TLB. Can make software TLB larger.

Questions Who handles resource policies? Is there a problem with how exokernels handle resource policies? Why do we need secure bindings? Application does. Poor Isolation, conflicting policies. Protection / authorization of resources. Faster to do at kernel level, but kernel does not need to understand resources. Not enough space in the hardware TLB. Can make software TLB larger.

Questions Who handles resource policies? Is there a problem with how exokernels handle resource policies? Why do we need secure bindings? Protection / authorization of resources. Faster to do in kernel and kernel does not need to understand resources. Why does Exokernel use a software TLB instead of the hardware TLB? Application does. Poor Isolation, conflicting policies. Protection / authorization of resources. Faster to do at kernel level, but kernel does not need to understand resources. Not enough space in the hardware TLB. Can make software TLB larger.

Exokernel Takeaways Can have a minimal kernel and have application customize operating system Fast Poor isolation Each application implements own LibOS No way to prevent systems from conflicting Hardware compatibility Need to change LibOS depending on hardware interface

Containers1 Hypervisor Hardware abstraction Previous virtual machines ran on top of hypervisors No isolation What if one operating system is not good for the same application? 1 Container-based Operating System Virtualization: A Scalable, High performance Alternative to Hypervisors Stephen Soltesz, Herbert Potzi, Marc Fiuczynski, Andy Bavier, Larry Peterson. EuroSys ’07.

Containers Container Container Container MySQL Web Server MySQL Grouping of processes Provide isolation between groups Containers cannot customize operating systems Isn’t this similar to the problem exokernels tried to solve? Operating system may not be good for all groupings. Container Container Container MySQL Web Server MySQL Web Server Web Server OS Hypervisor

Unikernel: Library Operating Systems for the Cloud Anil Madhavapeddy, Richard Mortier, Charalampos Rotsos, David Scott, Ralraj Singh, ThomasGazagnaire, Steven Smith, Steven Hand, and Jon Crowcroft University of Cambridge, University of Nottingham, Citrix Systems Ltd, OCamlPro SAS In Proceedings of the 18th International Conference on Architectural Support for Programming Languages and Operating Systems pg. 461–472.

Unikernel = EXOKERNEL + CONTAINERs Run one application per virtual machine One process per application Everything compiled into a VM image Do not compile unused code Unikernel, Figure 1

Unikernel Run directly on top of standard hypervisor Can run multiple unikernels on the same hypervisor Unikernel Unikernel Unikernel Application Application Application OS OS OS Hypervisor

Mirage Produces unikernels Compiles OCaml code to Xen VM image 4 main components Text + Data segment Foreign Grants Minor Heap Major Heap Chose OCaml because of flexibility (implement imperative, functional, and OOP). Brevity. High performance. Xen is implemented in OCaml, so integration is easy. PV Boot - Way to initialize VM with a single virtual CPU and multiple Xen event channels. Unikernel, Figure 2

Text and Data OCaml Runtime PVBoot Initializes VM Initializes VM that application runs in Unikernel, Figure 2

HEAP Minor Heap Short lived values in VM Fast Major Heap Long lived values Unikernel, Figure 2

Foreign Grants Used for VM communication Write data to a grant table Exchange table between VM address spaces Unikernel, Figure 2

ApACHE BENCHMARK Mirage unikernel improvements result in better performance than having multiple cores Unikernel, Figure 2

Exokernel versus Unikernel All applications on same system Poor isolation Unikernel Single application per system Better isolation

protected control transfer Implementation of interprocess communication Put the messages in the receiver process’s context Asynchronous: Rest of sender process's time slice goes to receiver Synchronous: All future time slices go to receiver process 7x faster than best reported implementation Exokernel, Table 6

Time to perform null procedure and system calls Exokernel, Table 5

Time for IPC Exokernel, Table 8

Time to perform vm operations Exokernel, Table 10

Time to perform vm operations (two different page-tables) Table 3, Exokernel

Roundtrip latency over ethernet Exokernel, Table 11

EXOKERNEL: Separate Protection From Management Tracking ownership of resources Protect bindings and resource usage Ex. Accessing memory not accessible to application Revoking resource privileges Go into more detail on what each bullet point means Exokernel, Figure 1

EXOS Application-level stride Scheduler Each process given a fixed proportion of resources Implemented counter program One process given 3x time, another 2x time, last one 1x time Exokernel, Figure 3

TIme to perform lrpc extensions Table 12

Time to classify TCP/ip Headers Exokernel, Table 7

Time to perform 150x150 matrix multiplication Exokernel, Table 9

Sample of aegis’s call interface Table 2

Machine Configuration for exokernel experiments Table 1

Sample of Aegis’s primitive operations Table 3

Exokernel Provides interface to interact with hardware Physical resources managed at application-level Most of the system implemented using a Library Operating System Separate resource protection from resource management

Secure bindings Used by LibOSes to access resources Decouples authorization from use of resource Performs authorization at bind time Hardware can implement protection checks quickly

Library Operating System (Libos) Use hardware interface Implement rest of the operating system Implementation can be specialized to meet needs of applications