Mach System - Distributed Operating Systems - Lecture Slides, Slides of Computer Science

These are the Lecture Slides of Distributed Operating Systems which includes Neumann Bottleneck, Networked Information, Memory Hierarchy, Evidence, Latency, Communication, Intelligent Service, Communication Latency, Routing Path etc.Key important points are: Mach System, Operating System Microkernel, Microkernel- Minimal Operating, Operating System Services, Carnegie Mellon University, Commercial Operating Systems, Developed, History, Industry Attention, Including Multiprocessor Versions

Typology: Slides

2012/2013

Uploaded on 03/27/2013

ekana
ekana 🇮🇳

4

(44)

370 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
The Mach System
A Case Study
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Mach System - Distributed Operating Systems - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

The Mach System

A Case Study

What is Mach?

 An operating system microkernel

 Microkernel- minimal operating system kernel that provides

only a basic set of operating system services

 Other services provided by user-space programs called

servers

 Originally developed at Carnegie Mellon University to

support operating system research

 Replacement for the kernel in BSD (Unix)

 Still the standard by which other microkernel projects

are measured

 In use in many commercial operating systems (including

Mac OS X)

History (2)

  • In Mach 3.0, compatibility with

BSD was improved

  • Previous versions included much of the BSD kernel
  • 3.0 moved the BSD code outside of the kernel, resulting in a much smaller microkernel
  • All Unix specific code runs in user-mode servers
  • Running in user-mode servers allows BSD code to be easily replaced with another operating system, or the simultaneous execution of multiple operating-system interfaces on top of the microkernel

The Mach 3.0 System Image from appendix of “The Mach System”

History (3)

  • Mach 4.0 developed at University of Utah after CMU’s

project finished

  • Since then, Mach and its derivatives have been used in a

number of commercial systems, most notably Mac OS X

  • Encore's Multimax
  • NeXT OS
  • MachTen for the Macintoshes
  • Omron's Luna
  • DEC's OSF/1 for the DEC Alpha
  • IBM's OS/2 for the RS6000 based machines.
  • NEXTSTEP
  • OPENSTEP

Definitions (1)

  • Microkernel
    • Minimal operating system kernel that provides only a basic set of operating system services
  • Task
    • “An execution environment that provides the basic unit of resource allocation. It consists of a virtual address space and protected access to system resources via ports, and it may contain one or more threads.” (Silberschatz)
  • Thread
    • “The basic unit of execution and must run in the context of a task (which provides the address space). All threads within a task share the tasks’ resources (ports, memory, and so on). There is no notion of a process in Mach. Rather, a traditional process would be implemented as a task with a single thread of control.” (Silberschatz)

Definitions (2)

  • Port
    • “The basic object-reference mechanism in Mach and is implemented as a kernel-protected communication channel. Communication is accomplished by sending messages to ports; messages are queued at the destination port if no thread is immediately ready to receive them. Ports are protected by kernel- managed capabilities, or port rights; a task must have a port right to send a message to a port. The programmer invokes an operation on an object by sending a message to a port associated with that object. The object being represented by a port receives the messages.” (Silberschatz)
  • Port set
    • “A group of ports sharing a common message queue. A thread can receive messages for a port set and thus service multiple ports. Each received message identifies the individual port (within the set) from which it was received; the receiver can use this to identify the object referred to by the message.” (Silberschatz)

Features (1)

• Microkernel Architecture

  • Adding a new service does not require modifying the

kernel

  • More operations are done in user mode rather than in the kernel, providing more security
  • Simpler kernel design generally produces more reliable system

• General enough to support multiple operating

system interfaces

• Support for diverse architectures, including

multiprocessor with different memory access

levels:

Features (2)

• Distributed operations

  • Network transparency to clients
  • Object-oriented organization

• Functions with various inter-computer network

speeds

  • Wide area networks
  • Local area networks
  • Tightly-coupled multiprocessors

• Integrated memory management and inter-

process communication

  • Efficient communication of large amounts of data
  • Communication-based memory management Docsity.com

Structure (2)

Process Management

  • Mach handles tasks and threads. One task can store multiple

threads.

  • Tasks/Threads are either Running or Suspended.
  • Mach provides minimal yet sufficient functionality in the kernel for handling tasks and threads.
  • C Threads package
  • A package (with OTB Mach) to do more advanced thread handling
  • CPU Scheduler
  • Only threads scheduled, not tasks
  • Threads assigned priority between 0 and 127 based on recent CPU usage
  • Threads placed in one of 32 queues based on priority
  • Exception Handling
  • A raise RPC messages is sent to the handler by the thread
  • Thread calls a routine to wait until the exception is handled
  • Handler receives information about the exception, including the Docsity.com

Structure (3)

Interprocess Communication

  • Ports
    • The kernel creates several ports for each task that is created
    • Ports can be collected in to Port Sets, which is useful if a thread

services requests coming in on multiple ports (multiple objects)

  • Messages
    • Consists of fixed-length header and variable number of typed

data objects

  • Network Message Server (NetMsgServer)
    • Handles IPC across different machines on the distributed OS
    • Transparent to the user
  • Synchronization
    • Port is used as a synchronization variable. Threads wishing to

use the port send a “receive” command. The port waits if there

is no incoming message. To return the resource after use, a

thread simply sends a message to the port. Docsity.com

Usage

• Because Mach 3.0 uses a microkernel, only the basic

features of the kernel are available

• Full functionality is provided by using emulation

libraries that reside outside of the kernel

• Emulation Libraries are sets of routines that live in a

read-only part of a program’s address space

• More complex operating systems (such as BSD) can be

created by using multiple emulation libraries in

combination one or more servers

• Run-time libraries, such as the C Threads package, can

also be created to provide more functionality.

Applications

• Encore's Multimax

• NeXT OS

• MachTen for the Macintoshes

• Omron's Luna

• DEC's OSF/1 for the DEC Alpha

• IBM's OS/2 for the RS6000 based machines.

• NEXTSTEP

• OPENSTEP

• Mac OS X (using the XNU kernel)

Summary

The Mach System, especially Mach 3.0, is an

excellent example of one of the earliest

microkernel systems. Although it is not

heavily used because of some performance

problems, it helped lead the way to many of

the higher performance second generation

microkernels.