EECS 262a Advanced Topics in Computer Systems Lecture 26 seL4 Kernel verification April 27 th, 2016 John Kubiatowicz Electrical Engineering and Computer.

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
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 Presented by Allen Kerr.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Microkernels How to build a dependable, modular and secure operating system?
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.
Computer Systems/Operating Systems - Class 8
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
1/21/2008CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
1 Building with Assurance CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute May 10, 2004.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Improving IPC by Kernel Design Jochen Liedtke Shane Matthews Portland State University.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
Microkernels: Mach and L4
Strategic Directions in Real- Time & Embedded Systems Aatash Patel 18 th September, 2001.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
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?
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
EECS 262a Advanced Topics in Computer Systems Lecture 26 seL4 Kernel verification December 3rd, 2014 John Kubiatowicz Electrical Engineering and Computer.
Paper by Engler, Kaashoek, O’Toole Presentation by Charles Haiber.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 6: Assembler slide 1www.idc.ac.il/tecs Assembler Elements of Computing.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Virtualization Concepts Presented by: Mariano Diaz.
Measures to Improve Security in a Microkernel Operating System Wasim Al-Hamdani Durga Vemuri Kentucky State University Kentucky State University
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Intro to Architecture – Page 1 of 22CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: Introduction Reading: Chapter 1.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Formally Verified Operating Systems SINGULARITY AND SEL4.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
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.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Writing Systems Software in a Functional Language An Experience Report Iavor Diatchki, Thomas Hallgren, Mark Jones, Rebekah Leslie, Andrew Tolmach.
Processes Introduction to Operating Systems: Module 3.
Operating Systems Structure what is the organizational principle?
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.
CS 346 – Chapter 2 OS services –OS user interface –System calls –System programs How to make an OS –Implementation –Structure –Virtual machines Commitment.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
The Performance of μ-Kernel-Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presenter: Sunita Marathe.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
MK++ A High Assurance Operating System Kernel Shai Guday David Black.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 2: OS Structures (Chapter 2.7)
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.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
2.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition System Programs (p73) System programs provide a convenient environment.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
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.
Computer System Structures
Operating System Structures
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Mach Kernel Kris Ambrose Kris Ambrose 2003.
Chapter 2: System Structures
Outline Chapter 2 (cont) OS Design OS structure
System calls….. C-program->POSIX call
John Kubiatowicz (With slides from Ion Stoica and Ali Ghodsi)
Presentation transcript:

EECS 262a Advanced Topics in Computer Systems Lecture 26 seL4 Kernel verification April 27 th, 2016 John Kubiatowicz Electrical Engineering and Computer Sciences University of California, Berkeley

4/27/20162cs262a-S16 Lecture-26 Today’s Paper seL4: Formal Verification of an OS Kernel, Gerwin Klein, Kevin Elphinstone, Gernot Heiser, June Andronick, David Cock, Philip Derrin, Dhammika Elkaduwe, Kai Engelhardt, Rafal Kolanski, Michael Norrish, Thomas Sewell, Harvey Tuch, Simon Winwood. Appeared in Proceedings of the ACM Symposium on Operating Systems Principles, 2009 Thoughts?

4/27/20163cs262a-S16 Lecture-26 Microkernel Structure Moves as much from the kernel into “user” space –Small core OS running at kernel level –OS Services built from many independent user-level processes –Communication between modules with message passing Benefits: –Easier to extend a microkernel –Easier to port OS to new architectures –More reliable (less code is running in kernel mode) –Fault Isolation (parts of kernel protected from other parts) –More secure Detriments: –Performance overhead severe for naïve implementation Figure ©Wikipedia Monolithic Kernel Microkernel

4/27/20164cs262a-S16 Lecture-26 On the cost of micro-kernels: Above: Ultrix (TAN) vs Mach (Reddish-brown) Cost of external pagers: page fault of first-generation microkernels took up to 1000µs! See optional paper “Toward Real Microkernels” by Leidtke After many iterations, L4 became a “best-in-class” microkernel –Fast IPC –Better resource control than simple pagers (“Address Space Managers”) –Other optimizations

4/27/20165cs262a-S16 Lecture-26 L4 MicroKernel Original L4 kernel: Jochen Liedtke –Derived from L3 kernel –Developed at GMD (Germany) –Designed to have fast IPC, better memory management, Picked up in several commercial usages

4/27/20166cs262a-S16 Lecture-26 Layers of Proof Techniques Results (including follow-on results) –Functional correctness verification in Isabelle/HOL framework –Functional correctness for hand-optimized IPC –Correctness of access-control enforcement –Automatic poof of refinement between compiled binary and C implementation –Automatic static analysis of worst-case execution time for sys calls

4/27/20167cs262a-S16 Lecture-26 In a nutshell Apply automatic techniques for “proof” of correctness –Series of refinements from Abstract Specification  Executable Specification  C implementation –Utilized Isabelle/HOL theorem prover Three different implementations –Spanning “obvious to humans” and “efficient”

4/27/20168cs262a-S16 Lecture-26 Three Implementations Abstract Specification: Isabelle/HOL code –Describes what system does without saying how it is done –Written as series of assertions about what should be true Executable Specification: Haskel –Fill in details left open at abstract level –Specify how the kernel works (as opposed to what I does) –Deterministic execution (except for underlying machine) –Data structures have explicit data types –Controlled subset of Haskel The Detailed Implementation: C –Translation from C into Isabelle requires controlled subset of C99 »No address-of operator & on local (stack) variables »Only 1 function call in expressions or need proof of side-effect freedom »No function calls through pointers »No goto, switch statements with fall-through Machine model: need model of how hardware behaves

4/27/20169cs262a-S16 Lecture-26 Example: Scheduling Figure 3: Isabell/High- order logic (HOL) code for scheduler at abstract level Figure 4: Haskell Code for Scheduler

4/27/201610cs262a-S16 Lecture-26 Challenges Smaller Kernel  Increased Interdependence of components –Radical size reduction in microkernel leads to high degree of dependence of remaining components –Proof techniques still possible Design special versions of each of the languages Design multiple implementations each in different languages Huge number of invariants is moving from Abstract specification to Executable specification –Low-level memory invariants –Typing invariants –Data structure Invariants –Algorithmic Invariants

4/27/201611cs262a-S16 Lecture-26 Experience and Lessons Learned Performance –Optimized IPC path is well performing (via micro-benchmarks) –Other performance not characterized in this paper Verification effort: extremely high! –Three phases, each with non-trivial effort –Overall size of proof (including automatically generated proofs): 200,000 lines of Isabelle script –Abstract Spec: 4 person months (4 pm) –Haskell prototype: 2 person years (2 py) –Executable spec translated from Haskel prototype: 3 pm –Initial C translation+implementation: 2pm –Cost of the proof: 20py (seL4 specific, 11py) What about future: 8py for new kernel from scratch! Cost of change –Simple or independent small features not huge, say 1 person week –Cost to add new features can be very large: up to 2py!

4/27/201612cs262a-S16 Lecture-26 Is this a good paper? What were the authors’ goals? What about the evaluation/metrics? Did they convince you that this was a good system/approach? Were there any red-flags? What mistakes did they make? Does the system/approach meet the “Test of Time” challenge? How would you review this paper today?

4/27/201613cs262a-S16 Lecture-26 Final Project Timing Poster Session: –Next Thursday (5/5) from 10:30 – 12:30 –Plan on staying whole time, but might be shorter Final paper: –Due Tuesday AOE (by 5am) –10 pages, 2- column, conference format –Must have a related work section! –Also, plan on a future work and/or discussion section –Make sure that your METRICs of success are clear and available

4/27/201614cs262a-S16 Lecture-26 Thank you! You have all been great!