1 / 15

The Mach System

The Mach System. "Operating Systems Concepts, Sixth Edition" by Abraham Silberschatz , Peter Baer Galvin, and Greg Gagne Presentation by Jonathan Walpole. Mach is a Microkernel OS. History. Developed at CMU Based on the Accent Operating System BSD Unix support

dvanhouten
Download Presentation

The Mach System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Mach System "Operating Systems Concepts, Sixth Edition" by Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presentation by Jonathan Walpole

  2. Mach is a Microkernel OS

  3. History • Developed at CMU • Based on the Accent Operating System • BSD Unix support • Mach influenced other OS designs • GNU Hurd • OSF • Mac OS X • etc

  4. Goals • Support a diverse range of architectures • UMA, NUMA, NORMA • homogeneous and heterogeneous systems • Integrate memory management and IPC • Minimal kernel • Ease of use (Unix compatibility) • Ease of porting

  5. message text region port threads data region port set secondary storage memory object Key Building Blocks • Task • Thread • Port • Port set • Message • Memory object task

  6. Process Management • Tasks and threads • Synchronization primitives: • Message exchange using Mach IPC: • Semaphore wait/signal operations can be implemented using IPC • Suspend and resume calls defined for thread synchronization

  7. User-Level Threads • C Thread library built on top of Mach primitives • Influenced POSIX P Threads standard • Thread-control: • Create/Destroy a thread • Wait for a specific thread to terminate then continue the calling thread • Yield • Mutual exclusion using spinlocks • Condition Variables (wait, signal)

  8. CPU Scheduling • Only threads are scheduled • dynamic thread priority based on CPU usage • Global run queues + per processor local run queues • Thread time quantum varies inversely with total number of threads, but constant over the entire system

  9. Interprocess Communication • Location independent IPC • Sender/Receiver must have rights • port name + send or receive capability • Ports: • Protected bounded queue in the kernel • System Calls: • Allocate new port in task, give the task all access rights • Deallocate task’s access rights to a port • Get port status • Create backup port • Port sets

  10. Interprocess Communication • Messages: • Header + typed data objects • Header: destination port name, reply port name, message length • In-line data: simple types, port rights • Out-of-line data: pointers • Via virtual-memory remapping • Copy-on-write

  11. Interprocess Communication • NetMsgServer: • user-level capability-based networking daemon • used when receiver port is not on the kernel’s computer • Forward messages between hosts • Provides primitive network-wide name service

  12. Memory Management • Memory Object • secondary storage, or data mapped into virtual memory • served by user-level memory managers • User-level Memory Managers: • Memory can be paged by user-written memory managers • Mach has no knowledge of memory object contents • New system calls to support external memory managers • Mach default memory manager

  13. Memory Management and IPC • Memory Management using IPC: • Memory objects represented by port(s) • IPC messages to those ports to request operation on the object • Memory objects can be remote  kernel caches the contents • IPC using memory-management techniques: • Pass message by moving pointers to shared memory objects • Virtual-memory remapping to transfer large contents using virtual copy / copy-on-write techniques

  14. Programmer Interface • System-call level • Implemented via emulation libraries and servers • Micro-kernel upcalls to libraries in task address space, or server • C Threads package • C language interface to Mach threads primitives • Not suitable for NORMA systems • Interface/Stub generator (MIG) for RPC calls

  15. Summary • Minimal kernel • A few simple abstractions • Communication is foundational • Higher level OS functionality built in user level servers

More Related