Mach - 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, Case Study, Microkernel, Services Needed, Complete Operating System, User-Space, Communicate, Event Handler, Operating System, Computer Science

Typology: Slides

2012/2013

Uploaded on 03/27/2013

ekana
ekana 🇮🇳

4

(44)

370 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Case Study: Mach
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

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

Case Study: Mach

Docsity.com

Mach: Overview

Mach is a microkernel that provides the most elementary services needed for an operating system. It is not a complete operating system.

More advanced operating system functions are handled by separate user-space server programs that run on top of and communicate with Mach.

Mach's only functions are to keep the servers running and to coordinate their access to raw hardware. At its most basic level, it is an event handler, not an operating system as such.

Docsity.com

Mach: History (2)

● During testing, BSD was ported to run on top of Mach so that it could be tested as part of a running system

● Its main purpose was just to get a running system

● It consisted of the monolithic BSD kernel converted into one user-space server program, instead of into one user- space server for each individual service

● Due to this, Mach's performance on it was very poor

● This was not the last attempt at porting BSD to Mach, however

Docsity.com

Mach: History (3)

● Some other projects based on Mach technology:

  • GNU Hurd: Free Software Foundation (Mach 3.0 & 4)
  • LITES: Helsinki University of Technology (Mach 3.0 &
  • Darwin: Apple (Mach 3.0)
  • NeXTStep: NeXT (Mach 2.5)
  • OSF/1 Unix: Open Software Foundation (Mach 2.5 & 3.0)

● The last three of these successfully run Mach on top of BSD, getting better performance by running the latter inside the former (i.e, at kernel level instead of user level) Docsity.com

Mach: Definitions

● Abstractions

  • Messages: data sent from and received by tasks
  • Ports: unicast, unidirectional message queues used by tasks
  • Port sets: sets of ports on which tasks wait until they receive a response from any one port in the set
  • Port rights: what tasks use in order to make use of ports (send rights, send-once rights, and receive rights)
  • Threads: tasks contained inside other (multithreaded) tasks Docsity.com

Mach: Features

● Portability, needed for Mach's elementary operating system services to work on a wide variety of machines with different capabilities

● Transparent network operation, needed for the possibility that the servers providing advanced services for it are running on different machines (i.e, that the system is distributed)

● Distributed virtual memory, needed for Mach's method of transferring out-of-line data between tasks

● All features needed to implement Mach's stated goals

Docsity.com

Mach: Structure (2)

● Send-once rights

  • Send-once rights only allow the tasks holding them to send messages once, after which the rights are lost

● Receive rights

  • Only one task can hold receive rights for a given port or port set
  • A port receive right can be transferred by a message from the task that holds it, but a port set receive right cannot
  • If no task has the receive right for a port, the messages sent to the port are queued until one gets itDocsity.com

Mach: Structure (3)

● Tasks

  • Any given task, when first created, starts with a bootstrap port right, send rights to a kernel port, and send and receive rights to an exception port
  • A task uses its kernel port to invoke kernel services (which include performing operations on itself, creating new threads, and the like)
  • On an exception associated with an exception port, the kernel sends a message containing a description of the exception to the port, the task tries to fix the problem and indicates success or failure via a Docsity.com

Mach: How to Use It (1)

● One uses Mach mainly by sending messages to it and receiving messages from it, subject to its constraints

● Not all kernel interface calls will be described here, and not in all detail, since there are over 100

● Message call API:

  • #include mach/port.h and mach/message.h
  • mach_msg_return_t mach_msg (mach_msg_header_t *msg, mach_msg_option_t option, mach_msg_size_t send_size, mach_msg_size_t rcv_size, mach_port_t rcv_name, mach_msg_timeout_t timeout, mach_port_t notify) Docsity.com

Mach: How to Use It (2)

● Mach message format:

  • a fixed size message header (mach_msg_header_t) followed by an optional number of data items
  • each data item contains a type descriptor followed by data (or a data address, in the case of out-of-line data transfers)

● Mach message data types:

  • mach_msg_bits_t: unsigned int corresponding to the flags associated with a message
  • mach_msg_size_t: unsigned int corresponding to the size of a message Docsity.com

Mach: Applications

● Operating system emulation

  • Mach can intercept operating system calls and redirect them to servers that can handle them, allowing emulation of that operating system

● Efficient sharing of hardware resources between programs on one or more machines

  • Mach's mathods of interfacing to servers at unknown, possibly non-local, locations allow this

Docsity.com

Mach: Significance

● It is a first-generation microkernel

● It is designed for use in Unix-based or Unix-like distributed operating systems

● It can emulate systems by acting as a middleman, so to speak, between the emulated layer and the real layer

● It is good as a proof of concept (since second-generation microkernels such as L4 perform better than it does and are less complex)

Docsity.com