Macro- vs. Micro- Kernels Matthew Fluet CS614 – Advanced Systems April 5, 2001.

Slides:



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

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.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
MACHINE-INDEPENDENT VIRTUAL MEMORY MANAGEMENT FOR PAGED UNIPROCESSOR AND MULTIPROCESSOR ARCHITECTURES R. Rashid, A. Tevanian, M. Young, D. Golub, R. Baron,
Chorus Vs Unix Operating Systems Overview Introduction Design Principles Programmer Interface User Interface Process Management Memory Management File.
Introduction Separate application from different supplier run on different operating systems need some higher level of coupling Application often evolve.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Amoeba -- Introduction
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Ameoba Designed by: Prof Andrew S. Tanenbaum at Vrija University since 1981.
CS 550 Comparative Operating Systems
Amoeba Distributed Operating System James Schultz CPSC 550 Spring 2007.
G Robert Grimm New York University Opal.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Case Study: Mach David Ramsey CPSC550. Mach: Overview Mach is a microkernel that provides the most elementary services needed for an operating.
CS 550 Amoeba-A Distributed Operation System by Saie M Mulay.
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
Yousuf Surmust Instructor: Marius Soneru Course: CS550 Fall 2001
Learning Objectives Understanding the difference between processes and threads. Understanding process migration and load distribution. Understanding Process.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
The Mach System "Operating Systems Concepts, Sixth Edition" by Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presentation by Jonathan Walpole.
Chapter 4.1 Interprocess Communication And Coordination By Shruti Poundarik.
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.
The Origin of the VM/370 Time-sharing system Presented by Niranjan Soundararajan.
The Amoeba Distributed Operating System Presented by Peter Hebden ICS 243F, Spring 2002.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Chapter 3 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.
Computer System Architectures Computer System Software
Presentation by Betsy Kavali
Paper Review Mach : A New Kernel Foundation For UNIX Development Chan Seok Kang 2013/02/26.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
B.Ramamurthy9/19/20151 Operating Systems u Bina Ramamurthy CS421.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
DCE (distributed computing environment) DCE (distributed computing environment)
“Operating Systems Concepts, Sixth Edition” by Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presented by Karl Matthias Portland State University.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
The Performance of Microkernel-Based Systems
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Amoeba – A Distributed Operating System for the 1990s
The Mach System Abraham Silberschatz, Peter Baer Galvin, Greg Gagne Presentation By: Agnimitra Roy.
Scott Ferguson Section 1
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
Applications Use as a Program development environment-it has a partial UNIX emulation library. Most of the common library calls like open, write, close,
The Mach System Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presented by: Jee Vang.
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.
The Mach System Silberschatz et al Presented By Anjana Venkat.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
OS Organization Andy Wang COP 5611 Advanced Operating Systems.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Amoeba Objectives: to the user system should look like a single computer The computing power is located in a processor pool containing a number of CPU’s,
AMOEBA study of distributed system
Carnegie-Mellon University, Pittsburgh Presented by Mehmet Belgin
The Mach System Sri Ramkrishna.
Operating System Organization
Mach OS.
Chorus Distributed OS - Goals
File System Implementation
Operating System Structure
Mach Kernel Kris Ambrose Kris Ambrose 2003.
Threads, SMP, and Microkernels
The Amoeba Distributed Operating System
Amoeba -- Introduction
Introduction Separate application from different supplier run on different operating systems need some higher level of coupling Application often evolve.
Outline Operating System Organization Operating System Examples
Operating Systems Structure
Presentation transcript:

Macro- vs. Micro- Kernels Matthew Fluet CS614 – Advanced Systems April 5, 2001

Macro-Kernel OSs Examples Traditional UNIX VMS OS is implemented in “one piece” Knowledge about the basic system structure is spread throughout the operating system

Micro-Kernel OSs Examples Mach Chorus Amoeba OS is implemented in “separate pieces” Kernel controls the basic hardware resources Services implement the unique characteristics of an OS environment

Mach Carnegie Mellon University: 1985 – 1994 Portions incorporated into a number of commercial OSs NeXT OS and Mac OS X DEC's OSF/1 for the DEC Alpha IBM's OS/2 for the RS6000 based machines Development continuing in University of Utah's Flexmach project and the Free Software Foundation's HURD system

Mach – Goals Support for multiple threads of control within a single address space An extensible and secure interprocess communication facility Architecture independent virtual memory Integrated IPC/VM support Hooks for transparent shared libraries to provide binary compatibility with existing OS environments

Mach – Abstractions Task: an execution environment in which threads may run Thread: a basic unit of CPU utilization Port: a communication channel that supports send and receive Message: a typed collection of data objects used in communication between threads

Mach – Tasks and Threads Tasks are related by a tree structure of task creation operations Regions of virtual memory can be marked as inheritable read-write, copy-on-write, or none Parallelism can be achieved in three ways A single task with many threads executing in a shared address space Many tasks related by task creation that share restricted regions of memory Many tasks communicating via messages

Mach – Virtual Memory Handle page faults and page-out data requests outside the kernel VM objects are represented as communication channels Kernel sends message to a pager task Flexibility allows efficient implementations File systems Databases Dynamic encryption and/or compression Network shared memory

Mach – IPC Ports and messages are used to provide location independence, security, and data type tagging Ports can have any number of senders, but only one receiver Messages have fixed length headers and a variable sized collection of typed data objects

Mach – Networking Kernel provides no mechanism for IPC over a network Network Servers: user-level tasks that allow transparent IPC over a network Network servers act as local representatives for tasks on remote nodes

Mach – OS emulation Server tasks run on top of the kernel Multithreaded UNIX Server A monolithic kernel run as a user program Multiserver UNIX A collection of servers providing UNIX functionality

Mach – Servers Examples Name Server Task Manager Authentication Server Network Server UNIX File Server NFS Server UNIX TTY Server UNIX Pipe Server

Amoeba Vrije Universiteit and Centrum voor Wiskunde en Informatica:

Amoeba – Goals Distribution – connecting together many machines Parallelism – allowing individual jobs to use multiple CPUs easily Transparency – having the collection of computers act like a single node Performance – achieving all of the above in an efficient manner

Amoeba – Objects An object is conceptually an abstract type Software and hardware objects Each object managed by a server process to which RPCs can be sent A capability is a 128-bit value Server Port 48 Object # 24 Rights 8 Check Field 48

Amoeba – Remote Operations Primitives get_request(req_hdr, req_buf, req_size) put_reply(rep_hdr, rep_buf, rep_size) do_operation(req_hdr, req_buf, req_size, rep_hdr, rep_buf, rep_size) Return status Request delivered and executed Request not delivered or executed Status unknown

Amoeba – Threads All threads in a process share the same address space Threads can (optionally) synchronize with mutexes and semaphores Threads are scheduled by the process

Amoeba – Servers Examples Memory Server & Process Server Segment: a contiguous area of memory with a capability Process descriptor: a data structure that provides information about a stunned process Bullet Server Implements a file system Directory Server Provides a mapping of names (ASCII strings) to 128-bit capabilities for access to the file system

Ameoba – WANs Domain: an inter-connected collection of local area networks Broadcasts limited to a single domain Processes publish services outside their domain by using the Service for Wide Area Networks (SWAN) Server and client agents coordinate between domains

Amoeba – OS Emulation UNIX emulation Session server provided to handle state information and handle fork and exec

Chorus INRIA: 1979 – 1986 Chorus systèmes: 1987 – 1991

Chorus – Goals High-level coupling of applications Gradual on-line evolution Straightforward underlying architecture which allows the modularity of the application to be mapped onto the operational system and which conceals unnecessary details of distribution from the application

Chorus - Abstractions Nucleus: kernel that manages the exchange of messages between ports attached to actors Actor: an address space with components in both user and system space Threads: one or more in each actor Ports: global unique identifiers attached to an actor for exchange of messages by IPC Port Groups: provide multicast capabilities

Chorus - Nucleus At the lowest level, manages the local physical resources of a site At the highest level, provides a location independent IPC mechanism

Chorus – Actors Defines a protected address space, split into user address space and system address space System address space on a site is identical for all actors on a site Restricted access to system address space An actor is tied to one site and all threads of an actor are executed on that site A site failure leads to the complete crash of its actors

Chorus – Ports and Messages Message: a contiguous byte string logically copied from sender’s address space to the receiver’s address space Ports: represents both an address and an ordered collection of unconsumed messages Attached to one actor at a time Can migrate from one actor to another Port groups

Chorus – IPC and RPC IPC: asynchronous message sending Client is blocked only during local processing No guarantee that the message will be received RPC: synchronous remote procedure call

Chorus – VM management Segment: the unit of exchange between VM system and data providers Global object with capabilities Managed by system actors called mappers Regions: division of an actor’s address space Contains a portion of a segment mapped to a given virtual memory address with specified access rights

Chorus – Networking Kernel support for reconfiguration Port groups Port migration Network manager Remote IPC and RPC Locating distant ports Remote host failure handling

Chorus - Subsystems Sets of actors that export a unified API UNIX subsystem

Micro-Kernel OSs MachAmoebaChorus Tasks/ActorsMemory inheritance Process migration Tied to a site PortsCapabilitiesPort groups; Port migration Virtual MemoryPagersSegments (no swapping or paging) Segments, mappers, regions NetworkingNo kernel support Kernel support; Group comm. Limited kernel support

Criticisms and Questions Is there a significant advantage in using a micro-kernel design if one only implements a UNIX emulation server? Is completely transparent remote IPC and RPC desirable? How about transparency of communication over a LAN vs. over a WAN?

Philosophy - IPC Micro-kernel applications use cross- address space IPC to interact with traditional OC services System call is faster than a cross- address space IPC But, absolute difference has reached the point where it can largely be ignored

Philosophy – IPC (cont.) IPC has gotten faster faster than the rest of the OS Performance is dominated by caches, not address spaces All data does not need to be marshaled through the kernel All services do not need a hardware firewall

Implementation – Default MM Implementation of the default memory manager for Mach 3.0 that resides entirely in user space Handles all paging traffic to backing storage Uses a small set of kernel privileges to lock itself in memory and prevent deadlock

Implementation – Default MM Requirements for the default memory manager The default memory manager must be resident All pages moving between the kernel and the default memory manager must remain resident It cannot block to wait for more physical memory It cannot block to wait for the file system to allocate temporary disk storage, since the file system itself may be pageable

Implementation – Default MM Required extending the kernel interface with two system calls Lock a specified range of virtual addresses for the task into memory Permanently acquires a kernel stack for the thread Bypass the disk allocation problem by using a pre-specified list of disk blocks