Mach

  1. What is it: 
    1. Very large micro-kernel
    2. Very flexible
    3. Multi-CPU
    4. For research, production just happened????
  2. Where is it used
    1. Some people run it
    2. Is in NextOS (apple??)
    3. Is basis of MacOS X
    4.  Reference port for OSF/1.
  3. Platforms
    1. Can handle UMA, NUMA, NORMA.  
  4. Features
    1. Can have multiple personalities: BSD, OS/2, DOS, Macintoch
    2. Small number of kernel abstractions. (Did they succeed??)
    3. Distributed objects...
    4. Easy porting
    5. Multi-CPU -- including process migration
  5. Basic Abstractions
    1. Task -- what we call a process
    2. Thread -- what we call a thread
    3. Port -- what we would call a socket.
    4. Port Right -- a capability to send to a port.
    5. Port Set -- a group of ports having a common receive queue.  A read from a port set gets the first message sent to any port.  This is how they implement select.
    6. Message -- a message
    7. Memory -- Virtual RAM.
  6. Message Passing
    1. In large part massage passing speed  defines the cost of micro-kernel vs. macro-kernel.
    2. Speed of EVERYTHING depends on this!!
    3. Pass large messages by remapping address spaces
    4. Use Copy-On-Write for large messages that are not read only.
    5. Don't use (as far as I know) memory moving.
  7. How Virtual Memory is implemented
    1. Each memory region has a port associated with it.
    2. That port goes to the paging server.
    3. The paging server gets requests like pagein, pageout, etc.
    4. Kernel does standard LRU like stuff, but uses these requests to move data.
    5. Can use special servers for special needs (i.e. database, etc.).
    6. Can use remote servers for diskless clients
    7. Can use standard server if you don't want to worry about it.
    8. With message passing, local servers just get a pointer to the RAM, not a copy of the RAM.
    9. Can migrate processes easy.
  8. Process management
    1. Schedule threads, not processes
      1. Can hog CPU with multiple threads
    2. Priority goes from 0 to 127; based on time decayed average of CPU time used.
      1. Different from VMS system
      2. Different threads can have different priorities
    3. Put threads on global run queue of 32 queues.
    4. Each CPU has a local run queue.
    5. Schedule first local run queue (for device drivers, etc) then global run queue in order.
    6. Vary time quantum based on contention.
    7. Queues muct be locked before modification.
    8. Imagine the implementation where on some systems there is remote memory access, and others there is none.
    9. Have list of idle CPUs for quick dispatching.  Alternative would suck!