home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / mach / doc / unpublished / datamovement.doc.Z / datamovement.doc
Encoding:
Text File  |  1992-08-18  |  100.7 KB  |  1,836 lines

  1.                       DATA MOVEMENT IN KERNELIZED SYSTEMS
  2.  
  3.                        Randall W. Dean            Francois Armand
  4.                        School of Computer Science CHORUS Systemes
  5.                        Carnegie Mellon University 6 Avenue G. Eiffel
  6.                        5000 Forbes Avenue         78182 ST-QUENTIN-EN-Y
  7.                        Pittsburgh,  Pennsylvania 15213                      
  8.  
  9.                        (412) 268-7654             +33 (1) 30-64-82-00
  10.  
  11.                        rwd@cs.cmu.edu             francois@chorus.fr
  12.                        Fax: (412) 681-5739
  13.  
  14.                   This  paper  considers  how  two kernelized
  15.                   systems, Mach 3.0 with  the  BSD4.3  Single
  16.                   Server and CHORUS/MiX V.4, move data to and
  17.                   from   files    under    a    variety    of
  18.                   circumstances.   We give an overview of the
  19.                   kernel abstractions and system servers  and
  20.                   describe  in  detail the read() and write()
  21.                   paths of these two systems.  We then  break
  22.                   down  their  read() and write() performance
  23.                   and compare them to two monolithic systems,
  24.                   Mach 2.6 MSD(BSD4.3) and System V R4.0.  We
  25.                   then describe the compromises each  of  the
  26.                   two  kernelized  systems  made  in order to
  27.                   achieve a goal of performance comparable to
  28.                   the monolithic systems.  We conclude with a
  29.                   description of what techniques each  system
  30.                   uses that could benefit both each other and
  31.                   traditional monolithic systems.
  32.  
  33.              1. Introduction
  34.                A recent trend in  operating  system  research  has
  35.              been  towards  small kernels exporting a small set of
  36.              abstractions that are used by  a  server  or  set  of
  37.              servers   to   implement  the  services  provided  by
  38.              traditional operating systems [7, 9, 14, 18].    This
  39.              approach  to building operating system services gives
  40.              OS  developers  a   sophisticated   environment   for
  41.              building  and  testing  new  services and meeting the
  42.              needs of newer  hardware  platforms.    A  kernelized
  43.              system  also  allows  a  developer  to  mix and match
  44.              components  as  needed,  minimizing  or   eliminating
  45.              unneeded  capabilities  that  are a permanent part of
  46.              traditional monolithic systems.   Kernelized  systems
  47.              have also demonstrated that they are a sound basis on
  48.              which   one   can   build    distributed    operating
  49.              systems [2, 5]   and/or   provide  features  such  as
  50.              real-time [15, 19]         or         Object-Oriented
  51.              environment [16].
  52.  
  53.                For  kernelized  systems  to  gain acceptance, they
  54.              must be binary compatible with and perform comparably
  55.              to  monolithic  systems.  Many  papers have described
  56.              efforts and experiences towards achieving these goals
  57.               [6, 13].    Some  authors  have  asserted  that some
  58.              services, such as, the file  system,  do  not  belong
  59.              outside  of  the kernel [20].  One of the major fears
  60.              appears to be the need for costly context  switching.
  61.              To  meet  the  performance  goal, a kernelized system
  62.              must either make context  switching  faster  than  in
  63.              systems  where  it  is  not  in the critical path, or
  64.              somehow avoid them entirely  where  possible.    Data
  65.              movement  must  also  be  carefully designed in these
  66.              systems to avoid extra copying of data.
  67.  
  68.                This paper considers how two systems, Mach 3.0 with
  69.              the  BSD4.3 Single Server and CHORUS/MiX V.4, achieve
  70.              the performance goals by controlling  data  movement.
  71.              We are particularly concerned with how fast these two
  72.              systems can move data  to  and  from  files  under  a
  73.              variety  of circumstances.  First we give an overview
  74.              of the kernel abstractions  and  system  servers  and
  75.              describe  in  detail  the read() and write() paths of
  76.              these two systems. We then break  down  their  read()
  77.              and  write()  performance  and  compare  them  to two
  78.              monolithic systems, Mach 2.6 MSD(BSD4.3) and System V
  79.              R4.0.    Next we describe the compromises each of the
  80.              two  kernelized   systems   has   made   to   achieve
  81.              performance comparable to the monolithic systems.  We
  82.              conclude with a description of what  techniques  each
  83.              system  uses  that  could benefit both each other and
  84.              traditional monolithic systems.
  85.  
  86.              2. Microkernel Abstractions
  87.                The Mach 3.0 Microkernel  and  the  CHORUS  Nucleus
  88.              supply  a  similar  set  of abstractions for building
  89.              systems   servers [10, 17].      Unfortunately,   for
  90.              historical   reasons,   the  two  systems  often  use
  91.              different names to describe  the  same  thing.    The
  92.              remainder  of this section describes the abstractions
  93.              of Mach 3.0 and CHORUS relevant for understanding the
  94.              rest  of  the  paper  using either the common name or
  95.              both when necessary.
  96.  
  97.                 - A Task [4] or  Actor [8]  is  an  execution
  98.                   environment  and the basic unit of resource
  99.                   allocation.  Both  include  virtual  memory
  100.                   and  threads.   The Mach task also includes
  101.                   port rights.  An actor  includes  ports  as
  102.                   communication  resources.  A  task or actor
  103.                   can either be in kernel or user space.
  104.  
  105.                 - Threads are the basic unit of execution.  A
  106.                   task    or    actor   can   have   multiple
  107.                   simultaneous threads of execution.  Threads
  108.                   may communicate via Ports.
  109.  
  110.                 - Both  systems are built around Interprocess
  111.                   Communication or IPC.
  112.  
  113.                      * Mach ports are protected communication
  114.                        channels [12]  managed  by  the kernel
  115.                        with separate port rights residing  in
  116.                        each  task.    A thread uses the local
  117.                        name and right for a port residing  in
  118.                        its  task  to  send  typed data to the
  119.                        task having the unique  receive  right
  120.                        for that port.  Port Sets allow a task
  121.                        to clump a group of ports together for
  122.                        the purpose of receiving from multiple
  123.                        ports with only one thread.
  124.  
  125.                      * CHORUS IPC uses a single  global  name
  126.                        space with each port named by a Unique
  127.                        Identifier (UI) to send  untyped  data
  128.                        to  ports.    CHORUS  ports, which may
  129.                        belong to  different  actors,  may  be
  130.                        grouped  into port groups.  CHORUS IPC
  131.                        offers the capability of  broadcasting
  132.                        a  message  to  all  ports in a group.
  133.                        Actors running in supervisor space may
  134.                        define  message  handlers  to  receive
  135.                        messages.    Instead   of   explicitly
  136.                        creating   threads   to   receive  the
  137.                        messages,  an  actor  may   attach   a
  138.                        handler,  a  routine  in  its  address
  139.                        space, to the port on which  it  waits
  140.                        for  messages.    When  a  message  is
  141.                        delivered to the port, the handler  is
  142.                        executed  within  the  context  of the
  143.                        actor using a kernel provided  thread.
  144.                        This  mechanism  avoids  extra copy of
  145.                        data and context  switches  when  both
  146.                        the  client  and the server run on the
  147.                        same site. The connection  of  message
  148.                        handlers  is transparent to the client
  149.                        of a server.
  150.  
  151.                 - Address spaces
  152.  
  153.                      * In Mach, the address space of  a  task
  154.                        is  made  up  of  VM Objects.  Objects
  155.                        often map secondary storage managed by
  156.                        an  External  Pager [21].   An object,
  157.                        which is represented by a  send  right
  158.                        to  a  port,  must be entered into the
  159.                        task's address space with  vm_map  and
  160.                        can   subsequently   accessed  through
  161.                        normal memory accesses.
  162.  
  163.                      * The address space of a CHORUS actor is
  164.                        made up of Regions.  Regions often map
  165.                        secondary  storage   called   segments
  166.                        managed  by  Mappers.    A  segment is
  167.                        represented by a capability, a port UI
  168.                        and   a   key.    CHORUS  also  allows
  169.                        segments  to  be   read   or   written
  170.                        directly  without  mapping  them using
  171.                        sgRead() and sgWrite() Nucleus calls.
  172.  
  173.                 - Device Access
  174.  
  175.                      * Mach gives direct access to disks  and
  176.                        other  devices  through  device_read()
  177.                        and device_write().  The device_read()
  178.                        call,  which, like most Mach calls, is
  179.                        an RPC to the kernel, returns the data
  180.                        in  out  of  line memory directly from
  181.                        the   disk    driver    without    any
  182.                        unnecessary copies.
  183.  
  184.                      * By   contrast,   the   CHORUS  nucleus
  185.                        doesn't know about any  device  except
  186.                        the  clock.  Instead, it allows actors
  187.                        to  dynamically  connect  handlers  to
  188.                        interrupts  and traps.  Device drivers
  189.                        are implemented  this  way  by  actors
  190.                        running   in  the  supervisor  address
  191.                        space.
  192.  
  193.                 - To allow for binary compatibility, Mach and
  194.                   CHORUS  each  have a mechanism for handling
  195.                       TM
  196.                   Unix    system  call  traps   called   Trap
  197.                   Emulation  or  Trap  Handlers.    The  Mach
  198.                   kernel enables a task to redirect any  trap
  199.                   number  back  into the user task making the
  200.                   trap.  CHORUS has a mechanism for  allowing
  201.                   traps  to be handled by any actor runing in
  202.                   supervisor address space which has attached
  203.                   a handler to these traps.
  204.  
  205.              3. System Servers
  206.                Both  Mach  3.0  with  the BSD4.3 Single Server and
  207.              CHORUS/MiX V.4 consist of a small kernel  or  nucleus
  208.              described  in  the  previous section, and a server or
  209.              set of servers  running  in  user  mode  or  possibly
  210.              supervisor  mode  supporting  Unix  semantics.   This
  211.              section gives on overview of both  of  these  systems
  212.              server components.
  213.  
  214.  
  215.  
  216.              3.1. Mach 3.0 with the BSD4.3 Single Server
  217.                The   BSD4.3   Single   Server  is  a  single  user
  218.              application which exports  Unix  semantics  to  other
  219.              user  applications.  To communicate with this server,
  220.              an Emulation Library is loaded into the address space
  221.              of all clients beginning with /etc/init and inherited
  222.              subsequently by all  of  its  children.    A  typical
  223.              system  call  traps into the kernel and is redirected
  224.              by the Trap Emulation mechanism  back  out  into  the
  225.              Emulation  Library.    The  Emulation Library sends a
  226.              message  to  the  BSD4.3  Single  Server  which  then
  227.              executes  the  actual  Unix  call  and  returns  back
  228.              through   the   Emulation   Library   to   the   user
  229.              application.  The remainder of this section describes
  230.              the Emulation Library and BSD4.3  Single  Server  and
  231.              how they support Unix files.
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.              Figure 3-1:  A System Call in Mach 3.0 with the BSD4.
  259.  
  260.  
  261.              3.1.1. BSD4.3 Single Server and Emulation Library
  262.                     Structure
  263.                The  BSD4.3  Single Server is a single task made up
  264.              of numerous CThreads [11].  Most of the CThreads  are
  265.              part  of  a  pool which responds to messages from the
  266.              Emulation Libraries of Unix  processes.    When  they
  267.              receive  a  message  from a client Emulation Library,
  268.              they internally take on the identity of  that  client
  269.              and  execute  the appropriate Unix system call.  Upon
  270.              completion, they return the result  and  reenter  the
  271.              pool  of  waiting  threads.    Each  of the remaining
  272.              CThreads provides a particular service.  There is the
  273.              Device Reply Thread, which handles all responses from
  274.              the server to the kernel for device interaction,  the
  275.              Softclock  Thread, which implements internal timeouts
  276.              and callbacks, the Net Input  Thread,  which  handles
  277.              network  device interactions with the kernel, and the
  278.              Inode Pager  Thread,  which  implements  an  external
  279.              pager backing Unix file objects.
  280.  
  281.                The  Emulation Library is actually a self-contained
  282.              module that is  loaded  into  the  address  space  of
  283.              BSD4.3 Single Server clients.  It is entered from the
  284.              kernel's Trap Emulation code in response to a  system
  285.              call.   The Emulation Library then either handles the
  286.              system call locally or  forwards  the  request  as  a
  287.              message  to  the  server  to handle it.  To allow the
  288.              Emulation Library to handle some system calls without
  289.              contacting  the  BSD4.3  Single Server, the Emulation
  290.              Library and the BSD4.3 Single Server share two  pages
  291.              of memory.  While the Emulation Library can read both
  292.              pages, it can only write one of them.  The  read-only
  293.              page  contains  information that a client can already
  294.              get through querying system calls such  as  getpid(),
  295.              getuid(),   and  getrlimit().    The  writeable  page
  296.              contains data that the client can already set through
  297.              system  calls  such  as  sigblock() and setsigmask().
  298.              The writeable page also contains an array of  special
  299.              files descriptors used by the mapped files system.
  300.  
  301.  
  302.              3.1.2. Mapped Files
  303.                The  BSD4.3  Single  Server  is  capable of mapping
  304.              files backed by the Inode  Pager  directly  into  the
  305.              address  space  of  clients  for direct access by the
  306.              Emulation Library.  These mapped regions are actually
  307.              windows  into  the  Unix files that can be moved by a
  308.              request from the Emulation Library.  There is exactly
  309.              one  window  of 64K bytes in size for each open file.
  310.              For each mapped region, there is a corresponding file
  311.              descriptor  in  the  writeable page of shared memory.
  312.              This file  descriptor  contains  information  on  the
  313.              current  mapping  window  and a copy of the real file
  314.              descriptor in the BSD4.3 Single Server.
  315.  
  316.                To allow  for  Unix  file  semantics  which  permit
  317.              multiple readers and writers of files and the sharing
  318.              of the current file pointer, there is a Token scheme.
  319.              The  Token  protects  the mapping window information,
  320.              the file pointer and the file size.  The Token can be
  321.              in  three  states.  These are active, invalid and, to
  322.              limit the number  of  messages  sent  to  the  BSD4.3
  323.              Single  Server,  passive.    The  transitions between
  324.              these states is covered in section 4.
  325.  
  326.  
  327.  
  328.              3.2. CHORUS/MiX V.4
  329.  
  330.  
  331.              3.2.1. The CHORUS/MiX V.4 subsystem
  332.                MiX V.4 is a  CHORUS  subsystem  providing  a  Unix
  333.              interface  that is compatible with Unix SVR4.0. It is
  334.              both  BCS  and  ABI  compliant  on  AT/386  and   88K
  335.              platforms.  It  has  been  designed  to  extend  Unix
  336.              services to distribution such  as  access  to  remote
  337.              files and remote execution.
  338.  
  339.                MiX V.4 is composed of a set of cooperating servers
  340.              running in independent actors on top  of  the  CHORUS
  341.              Nucleus and communicating only by means of the CHORUS
  342.              IPC.  The following servers are the most important:
  343.  
  344.                 - The Process Manager (PM) provides the  Unix
  345.                   interface  to  processes.    It  implements
  346.                   services for process management such as the
  347.                   creation  and  destruction of processes and
  348.                   the sending of signals.    It  manages  the
  349.                   system context of each process that runs on
  350.                   its site.  When the PM is not able to serve
  351.                   a  Unix  system  call  by  itself, it calls
  352.                   other servers, as appropriate, using CHORUS
  353.                   IPC.
  354.  
  355.                 - The  Object  Manager  (OM),  also named the
  356.                   File Manager (FM), performs file management
  357.                   services.    It manages various file system
  358.                   types such as S5, UFS, and NFS.    It  also
  359.                   acts as a CHORUS Mapper for "mappable" Unix
  360.                   files and as the Default  Mapper  for  swap
  361.                   space   management.      Disk  drivers  are
  362.                   generally part of the Object Manager.
  363.  
  364.                 - The  Streams  Manager  (StM)  manages   all
  365.                   stream   devices  such  as  pipes,  network
  366.                   access, ttys, and named pipes when they are
  367.                   opened.    It  cooperates  with  the Object
  368.                   Manager  which   provides   the   secondary
  369.                   storage for the files' meta-data.
  370.  
  371.  
  372.  
  373.                      Figure 3-2:  CHORUS/MiX V.4 subsystem
  374.  
  375.                All  MiX  servers  are fully independent and do not
  376.              share  any  memory  and  thus  can  be  transparently
  377.              distributed  on  different  sites.  Although they may
  378.              run in either user space or supervisor space they are
  379.              usually  loaded  in  the  supervisor address space to
  380.              avoid numerous and expensive  context  switches  each
  381.              time  a  new server is invoked.  This paper discusses
  382.              the case where all servers are loaded into supervisor
  383.              space.
  384.  
  385.  
  386.              3.2.2. Regular File Management in CHORUS/MiX V.4
  387.                The  management  of  regular files is split between
  388.              three components in MiX V.4: the Object Manager,  the
  389.              Process  Manager  and  the  CHORUS Nucleus.  Pages of
  390.              regular files are read, written and cached using  the
  391.              Virtual  Memory  services,  sgRead()  and  sgWrite(),
  392.              without having to map them.  This allows the  support
  393.              of  mapped  files  and  provides  the  benefit of the
  394.              Virtual Memory  mechanisms  for  caching  files  from
  395.              local  or  remote  file  systems.  The Virtual Memory
  396.              cache replaces the  buffer  cache,  moreover  in  the
  397.              distributed  case, file consistency are maintained by
  398.              the  same  mechanisms  that  are  used   to   provide
  399.              distributed shared memory.
  400.                In  MiX  V.4,  open files are named by a capability
  401.              built from a port Unique Identifier and a 64-bit  key
  402.              only  meaningful  to  the server.  This capability is
  403.              returned to the PM by the OM when the  open()  system
  404.              call  is  made.    All opens of the same file get the
  405.              same capability.  For each open system call,  the  PM
  406.              manages an open file descriptor similar to the file_t
  407.              structure of a native Unix, that  handles  flags  and
  408.              the  current  offset.  In addition, the PM manages an
  409.              object descriptor for each file in use on  its  site.
  410.              This   object   descriptor   handles   the  following
  411.              information: size of the file, mandatory locks posted
  412.              against  the  file  (if  any),  last  access and last
  413.              modification time and, the  capability  of  the  file
  414.              exported  by the OM.  The PM uses this information to
  415.              convert  read()/write()  Unix   system   calls   into
  416.              sgRead()/sgWrite() CHORUS Nucleus calls.
  417.  
  418.  
  419.              3.2.3. File Size Management
  420.                Due  to  the separation between the Process Manager
  421.              and the Object Manager, a benefit which  allows  them
  422.              to potentially be distributed on different nodes, the
  423.              file size is protected by a Token.  Since  the  Token
  424.              may  have been granted to another site or recalled by
  425.              the OM, the PM  must  check  whether  the  file  size
  426.              information it holds is valid or not before using the
  427.              file size.  If the information is not valid,  the  PM
  428.              must retrieve the information first.
  429.  
  430.              4. Read() and Write() Path Analysis
  431.                This  section  takes  a detailed look at the read()
  432.              and write() paths of both Mach 3.0  with  the  BSD4.3
  433.              Single Server and CHORUS/MiX V.4.
  434.  
  435.  
  436.  
  437.              4.1. Mach 3.0 with the BSD4.3 Single Server read()
  438.                   Path
  439.                This  section  describes how the read() system call
  440.              works in Mach 3.0  with  the  BSD4.3  Single  Server.
  441.              When  a user makes a read() call the kernel redirects
  442.              that call  trap  back  into  the  Emulation  Library.
  443.              After  making  sure  that the file is mapped, that it
  444.              has a valid Token, and that the mapping is  into  the
  445.              desired  part  of  the  file,  the  Emulation Library
  446.              copies the data  from  the  mapped  region  into  the
  447.              user's buffer and returns.
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.              Figure 4-1:  Mach 3.0 with the BSD4.3 Single Server M
  475.  
  476.  
  477.              4.1.1. Read() in the Emulation Library
  478.                To  examine  the  file  descriptor in the writeable
  479.              shared page, the Emulation Library must first acquire
  480.              the  share  lock which protects this region.  A share
  481.              lock is different from a simple spin lock in that the
  482.              BSD4.3  Single  Server  does  not trust the Emulation
  483.              Library.   The  Emulation  Library  resides  in  user
  484.              memory  and  can  be  over-written  at any time by an
  485.              incorrect or malicious user program.  Therefore,  the
  486.              BSD4.3  Single Server must take measures to ensure it
  487.              does not deadlock on this share lock.  The share lock
  488.              is implemented as a simple spin lock in the Emulation
  489.              Library and as a test-and-set and block with  timeout
  490.              in the server.  When the server blocks, it requests a
  491.              callback  from  the  Emulation   Library   when   the
  492.              Emulation Library releases the lock.  If the callback
  493.              is not received in a configurable amount of time, the
  494.              server  assumes  the client is malicious or incorrect
  495.              and kills the task.
  496.  
  497.                Once the Emulation Library has acquired  the  share
  498.              lock,  it can examine the state of the Token.  If the
  499.              Token is invalid, the Emulation Library must  send  a
  500.              message  to  the server to acquire the Token.  If the
  501.              Token is passive, it  may  be  switched  directly  to
  502.              active   without   contacting  the  server  Once  the
  503.              Emulation Library has the Token, its file pointer and
  504.              mapping  info  are  guaranteed to be correct.  If the
  505.              mapping information is not adequate for  the  current
  506.              call, the Emulation Library can send a message to the
  507.              server to change the mapping.  With a valid  mapping,
  508.              the Emulation Library simply copies the data into the
  509.              user's buffer, updates the file pointer, and releases
  510.              the   Token.     If  the  BSD4.3  Single  Server  has
  511.              indicated, by setting a bit in the  file  descriptor,
  512.              that  another  task  is  waiting  for  the Token, the
  513.              Emulation Library sends a message to  the  server  to
  514.              completely  release  the  Token.   If no call-back is
  515.              needed, the Emulation  Library  moves  the  Token  to
  516.              passive.
  517.  
  518.  
  519.              4.1.2. Read() in the BSD4.3 Single Server
  520.                The  BSD4.3  Single Server can become involved in a
  521.              read() call in a  number  of  ways.    The  Emulation
  522.              Library  can  call  it directly in order to request a
  523.              Token, request  a  window  remapping,  or  release  a
  524.              Token.    The BSD4.3 Single Server can also be called
  525.              by the Mach kernel when the Emulation Library  faults
  526.              on  mapped data and the Inode Pager must be contacted
  527.              to satisfy the fault.  Each of  these  operations  is
  528.              described in detail below.
  529.  
  530.                A Token request is straightforward to process.  The
  531.              server keeps track of who has the Token and  examines
  532.              the  state of that process's file descriptor.  If the
  533.              holder of  the  Token  has  it  passive,  the  server
  534.              invalidates the Token and grants it to the requester.
  535.              If the Token is active, the server leaves a call back
  536.              request  with  the  holder and waits for it to send a
  537.              Token release call.
  538.  
  539.                A request to change the mapping window is extremely
  540.              simple when just reading from a file.  All the server
  541.              has to do is deallocate the existing window into  the
  542.              file  and  generate  a  new  mapping which covers the
  543.              range necessary for the read().  The handling of  the
  544.              remapping  operation for write() is covered in detail
  545.              in section 4.2.
  546.  
  547.                When the Emulation Library first touches a page  of
  548.              data  mapped  into  its  address  space, a page-fault
  549.              occurs.  The kernel receives this fault and  resolves
  550.              it  in  one  of  two  ways.    If the page is already
  551.              present in the kernel VM system, but  the  task  does
  552.              not  have a valid mapping, then the kernel enters the
  553.              page mapping and returns from the fault. If the  page
  554.              is  not  present  in  the  kernel, the kernel sends a
  555.              memory_object_data_request() message to the  External
  556.              Pager  backing this object.  In the case of Unix file
  557.              data, this is the Inode Pager in  the  BSD4.3  Single
  558.              Server.    The Inode Pager then reads the appropriate
  559.              data off disk with device_read()  and  provides  this
  560.              page back to the kernel.
  561.  
  562.                For  historical  reasons,  the Inode Pager uses the
  563.              buffer cache interface to read and write from and  to
  564.              disk.    This  leads  to  unnecessary  caching in the
  565.              BSD4.3 Single Server.  This also results in the Inode
  566.              Pager   using  a  less  efficient  and  now  obsolete
  567.              interface  memory_object_data_provided()  instead  of
  568.              memory_object_data_supply() to return the data to the
  569.              kernel.   The  former  requires  a  copy  within  the
  570.              kernel,  whereas  the  latter  uses  a  page stealing
  571.              optimization that eliminates the  copying.    In  the
  572.              page   stealing  optimization,  the  VM  system  just
  573.              removes the physical page from the server and  places
  574.              it directly in the Memory Object without copying it.
  575.  
  576.  
  577.  
  578.              4.2. Mach 3.0 with the BSD4.3 Single Server write()
  579.                   Path
  580.                The  write() path is almost identical to the read()
  581.              path.  The differences lie in correctly managing  the
  582.              file  size  and  writing  out dirty pages in a timely
  583.              fashion.   As  in  the  read()  case,  the  Emulation
  584.              Library sets up a valid mapping and copies the user's
  585.              data into the window.  A valid mapping may exist past
  586.              the  end  of  the file, so there is no need to handle
  587.              file extension as a special  case  in  the  Emulation
  588.              Library.
  589.  
  590.                If  the  Emulation  Library  write faults on a page
  591.              that is in the file, the Inode Pager returns the page
  592.              from  the  disk file to be over written.  In the case
  593.              of write() faulting on a new page, such as filling  a
  594.              whole  or extending the file, the Inode Pager returns
  595.              memory_object_data_unavailable()  which  causes   the
  596.              kernel  to  supply  a zero filled page to the client.
  597.              If  the  write()  extends  the  file,  the  Emulation
  598.              Library updates the file size field in the local file
  599.              descriptor.
  600.                Actual writes to disk and propagation of  the  file
  601.              size  occur  when  the  Token  is  taken  away from a
  602.              writer, when the writer changes its mapping, or  when
  603.              the  kernel  needs  free pages and starts sending the
  604.              mapped file pages to the Inode Pager to  be  cleaned.
  605.              In  the  first  two cases, the mapped file code first
  606.              updates  the  file  size  from  the   writer's   file
  607.              descriptor.          The     server     then    calls
  608.              memory_object_lock_request()  to  force  the  kernel,
  609.              which knows which pages have actually been written by
  610.              the user, to request cleaning  of  the  dirty  pages.
  611.              This  generates messages from the kernel to the pager
  612.              requesting that the dirty pages be written out.  When
  613.              the  Inode  Pager  receives  the dirty pages from the
  614.              kernel, it writes them out to disk.
  615.  
  616.                Disk block allocation is delayed until the data  is
  617.              actually  written  out to disk.  It would be possible
  618.              for the Inode Pager  to  allocate  new  blocks  in  a
  619.              timely  fashion  since it gets a data request message
  620.              when the Emulation Library  page-faults  on  the  new
  621.              page  to  be  written.    The  Inode  Pager currently
  622.              ignores the write fault attribute when returning  the
  623.              empty  page  to  satisfy  the  page-fault.    By  not
  624.              allocating at the time  of  the  initial  fault,  the
  625.              semantics for failure in the BSD4.3 Single Server are
  626.              not the same as Mach 2.6 MSD(BSD4.3).
  627.  
  628.                The difficulty occurs when there was a  involuntary
  629.              request  to  clean  pages from the kernel driven by a
  630.              memory shortage.  In the previous cases  where  dirty
  631.              pages and the file size were written out, the writing
  632.              was initiated by a call from the  Emulation  Library.
  633.              In  this  case  the Emulation Library could be in the
  634.              middle of a read() or  write()  call,  so  the  Inode
  635.              Pager must read the file size from the current holder
  636.              of the Token without taking that Token away.
  637.  
  638.  
  639.  
  640.              4.3. CHORUS/MiX V.4 read() Path
  641.                This section illustrates how a Unix  read()  system
  642.              call is handled in the CHORUS/MiX V.4 system.  When a
  643.              Unix process traps to the  system,  it  executes  the
  644.              trap  handler  connected by the Process Manager.  The
  645.              PM performs various checks  and  invokes  the  CHORUS
  646.              Nucleus  call  sgRead().    The Nucleus looks for the
  647.              corresponding page.  If the page is  found,  data  is
  648.              directly  copied into the user's buffer.  If the page
  649.              is not found, an upcall to the appropriate mapper  is
  650.              performed  by  sending a message to the port whose UI
  651.              is part of the file capability.  In  this  case,  the
  652.              mapper,  which  implements the disk driver, reads the
  653.              data from the disk and replys to  the  Nucleus  which
  654.              copies  out  the  data  into  the  user's buffer. The
  655.              overall mechanism is summarized in the figure 4-2.
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.                      Figure 4-2:  CHORUS/MiX V.4 read path
  689.  
  690.  
  691.              4.3.1. Process Manager
  692.                As in any Unix system, the library part of a system
  693.              call runs in user space and builds a stack frame with
  694.              the system call arguments and then traps.   The  trap
  695.              is  handled by the CHORUS Nucleus which redirects the
  696.              invocation to the trap handler connected by the PM at
  697.              init  time  by  means  of the svTrapConnect() Nucleus
  698.              call (arrow 0 in figure 4-2).
  699.  
  700.                The trap handler executes in  supervisor  space  in
  701.              the  context of the process invoking the system call.
  702.              The system stack used by the trap handler is the  one
  703.              provided  by  the  CHORUS  Nucleus at thread creation
  704.              time.   Using  software  registers  provided  by  the
  705.              CHORUS  Nucleus, the handler retrieves the thread and
  706.              process system context.  The user stack frame is then
  707.              copied  into  the  thread  structure  since  multiple
  708.              threads can run concurrently within a process  (arrow
  709.              1).
  710.  
  711.                Once the file descriptor has been validated, the PM
  712.              distinguishes  between  files  that  are   accessible
  713.              through the Virtual Memory Interface, such as regular
  714.              files and mappable character devices, and other files
  715.              such  as  directories  and  streams that are read and
  716.              written  by  sending  messages  to  the   appropriate
  717.              server.   The PM then acquires the current offset for
  718.              the file.  This requires that it hold a Token in  the
  719.              distributed  release  of the system.  When the system
  720.              runs on a single site, the PM  is  assured  that  the
  721.              offset information it has is always valid.
  722.  
  723.                The  PM then must determine whether the read starts
  724.              beyond the current End Of File, or not, and thus must
  725.              acquire  the file size information.  This information
  726.              is protected by a token mechanism which  is  separate
  727.              from  the  Token for the current offset.  At the time
  728.              the read() occurs, the Token might not be present  in
  729.              the  PM,  but  may  have  been  recalled  by  the OM.
  730.              Finally, after  having  checked  the  read  operation
  731.              against  mandatory locks (if any), the PM invokes the
  732.              sgRead() CHORUS Nucleus call.
  733.  
  734.  
  735.              4.3.2. CHORUS Nucleus
  736.                The CHORUS Nucleus  first  tries  to  retrieve  the
  737.              local  cache [1]  associated  with  the segment being
  738.              accessed.  A local cache is created for  the  segment
  739.              upon  the  first  access to the segment.  Through the
  740.              local cache descriptor the Nucleus accesses the pages
  741.              of  the  segment that are present in main memory, and
  742.              their associated access rights  whether  readable  or
  743.              writable.    In  case  the page being read is present
  744.              (arrow 2a) in the local cache, data is copied out  to
  745.              the user's buffer (arrow 3a).  If not present, a free
  746.              page is acquired (arrow 2b) and the  Mapper  managing
  747.              the  segment is invoked (arrow 3b).  Upon return from
  748.              the Mapper, the data is copied out  into  the  user's
  749.              buffer (arrow 5b).
  750.  
  751.                It  should  be  noted  that  the sgRead() operation
  752.              insures the  seriability  of  concurrent  overlapping
  753.              reads and and writes on a segment.
  754.  
  755.  
  756.              4.3.3. Mapper
  757.                In MiX V.4, regular files are managed by the Object
  758.              Manager, which acts as the Mapper for these files and
  759.              thus  handles  pullIn  (read page) and pushOut (write
  760.              page) requests for these  files.    When  the  Object
  761.              Manager  runs  in  supervisor address space it uses a
  762.              message handler to handle  incoming  requests.    The
  763.              client  thread  is made to run in the server context.
  764.              Direct  access  to  invoker  message  descriptors  is
  765.              permitted thus avoiding extra copy of data.
  766.  
  767.                The  Object  Manager then invokes the corresponding
  768.              function (e.g.:  ufs_pullin()) using an extension  to
  769.              the  vnode_ops  mechanism.   The file system specific
  770.              pullin function converts the page offset in the  file
  771.              into  a  physical  block  number and then invokes the
  772.              disk driver to load data.  The buffer area is set  up
  773.              so  that  it  points  directly  to  the physical page
  774.              provided by the Nucleus and passed  as  part  of  the
  775.              reply  message  (arrow  4b).    The  OM  only buffers
  776.              inodes, directory and indirect blocks.
  777.  
  778.  
  779.  
  780.              4.4. CHORUS/MiX V.4 write() Path
  781.                The  basic  mechanisms  are  similar  to  the  ones
  782.              described  for  the  read()  system call.  However, a
  783.              write() may extend a file or fill a hole in the file.
  784.              In  such a case, the system must immediately allocate
  785.              disk blocks for the written data.
  786.  
  787.                When the Object Manager returns a page of a file to
  788.              the  Nucleus,  it  returns  also an associated access
  789.              right  enabling  the  page   to   be   read-only   or
  790.              read-and-written.    When a process wants to extend a
  791.              file by writing after the EOF, the  Nucleus  requests
  792.              the  entire page for read/write access if there was a
  793.              cache miss, or only the write permission if there was
  794.              a cache hit, with no previous write access granted by
  795.              the Mapper.
  796.  
  797.                Before  the  Object   Manager   returns   a   write
  798.              permission for a page, it insures that blocks will be
  799.              available later  to  write  the  data  on  the  disk.
  800.              Blocks  are  allocated  to  the  file at the time the
  801.              write permission is  required.    When  the  file  is
  802.              closed, blocks that have been allocated but which are
  803.              not used (past the EOF)  are  returned  to  the  free
  804.              block pool.
  805.  
  806.                Finally  if  the  extension  of  the  file has been
  807.              successful, the PM changes  the  size  of  the  file.
  808.              This  requires  that  the  PM has the file size token
  809.              with a write access granted to the size information.
  810.  
  811.              5. Performance
  812.                This section contains the performance breakdown for
  813.              the   read()  and  write()  calls  described  in  the
  814.              previous sections plus  composite  numbers  for  both
  815.              these  systems  and  from  Mach  2.6  MSD(BSD4.3) and
  816.              System V Release 4.0/386.  The micro-benchmarks  show
  817.              where  the  time  is  consumed in the full read() and
  818.              write() call.  The benchmarks for Mach 3.0  with  the
  819.              BSD4.3  Single  Server  and Mach 2.6 MSD(BSD4.3) were
  820.              run on a HP Vectra 25C 80386/25Mhz with 16MB and  32K
  821.              cache,  a  WD  1007 disk controller and a 340MB disk.
  822.              The benchmarks for CHORUS/MiX V.4 and System  V  R4.0
  823.              were  run  on Compaq Deskpro 80386/25Mhz with 16MB of
  824.              memory and 32K SRAM cache, a WD 1007A disk controller
  825.              and  a 110MB disk drive.  The testing methodology was
  826.              to run a given test three to ten times and to  report
  827.              the median value.
  828.  
  829.                As  a number of tests show, the two test platforms,
  830.              HP Vectra and Compaq Deskpro,  have  quite  different
  831.              disk     and     memory     throughput    performance
  832.              characteristics.  Basically,  the  HP  Vectra  memory
  833.              throughput  is  between  40%  and 50% higher than the
  834.              Compaq  Deskpro  throughput  (see  table  5-1).    In
  835.              comparing  the  performance  of the different systems
  836.              below, it is essential to remember these  differences
  837.              and relate the figures to the maximum memory and disk
  838.              throughput of the two different platforms.
  839.  
  840.                To measure the performance of the memory  system  a
  841.              simple  bcopy  was  run  on  both machines.  Repeated
  842.              movement of 4096 bytes was used for the cached result
  843.              and repeated movement of between 256k and 1M was used
  844.              for the uncached result. Table 5-1  shows  throughput
  845.              and the time for copying a page of 4096 bytes.
  846.  
  847.  
  848.                                       --
  849.                                       ||       |            |
  850.                                                |            |
  851.                                       ||   HP Vectra   Compaq
  852.                                       ||       |            |
  853.                                       || |           |
  854.                                          |           |
  855.                                       ||Cached   21.2MB/sec   14.7MB/sec
  856.                                       || |           |
  857.                                       ||         |            |
  858.                                                  |            |
  859.                                       ||   184@G(m)s   265@G(m)s
  860.                                       ||         |            |
  861.                                       || |           |
  862.                                          |           |
  863.                                       ||UnCached   10.4MB/sec   6.4MB/sec
  864.                                       || |           |
  865.                                       || |           |
  866.                                       || | 379@G(m)s | 615@G(m)s
  867.                                       || |           |
  868.                                       --
  869.  
  870.                         Table 5-1:  Bcopy of 4096 bytes
  871.  
  872.                Two   of   the   primary  primitives  used  by  the
  873.              kernelized  systems  are  trap   times   and   Remote
  874.              Procedure Call or RPC times.  We measured the cost of
  875.              reaching the Emulation Library or Trap Handler in the
  876.              kernelized  system,  versus the cost of a kernel trap
  877.              in the monolithic systems.  For  this  test  we  used
  878.              getpid()  on  all  architectures.    To show how much
  879.              overhead there is in reaching the  Emulation  Library
  880.              or  Trap  Handler  for  a  Unix  call, including such
  881.              things as checking for signals, we measured the  cost
  882.              of a null trap into the kernel.  Table 5-2 also shows
  883.              RPC times for the two kernelized systems.   The  Mach
  884.              3.0  RPC  times are between two user tasks since this
  885.              is the type of communication that occurs between  the
  886.              Emulation  Library and the BSD4.3 Single Server.  The
  887.              Chorus Null RPC times corresponds to a null ipcCall()
  888.              issued  from a supervisor actor to another supervisor
  889.              actor handling messages via a message handler,  which
  890.              is what is used between PM and OM, and between Chorus
  891.              Nucleus and OM.  CHORUS/MiX V.4 has a more  expensive
  892.              getpid()  call  than  the native SVR4 implementation.
  893.              This is due, at least partially, to the MiX PM having
  894.              already   implemented   support   for   multithreaded
  895.              processes and multiprocessor platforms. Thus, MiX has
  896.              some  synchronization mechanisms that are not present
  897.              within the native Unix SVR4.
  898.  
  899.  
  900.                                       --
  901.                                       || |          |          |               |
  902.                                                                |
  903.                                       || | HP Vectra|     Compaq               |
  904.                                       || |          |          |               |
  905.                                       ||          |          |          |      |
  906.                                                                                |
  907.                                                                                S
  908.                                                                                V
  909.                                                                                R
  910.                                                                                4
  911.                                                   |          |          |      .
  912.                                       ||   Mach 3.0   Mach 2.6   CHORUS/MiX V.40
  913.                                       ||          |          |          |      |
  914.                                       ||             |          |          |   |
  915.                                                                                |
  916.                                                                                m
  917.                                                                                )
  918.                                                                                s
  919.                                                                                8
  920.                                                                                5
  921.                                                                                @
  922.                                                                                G
  923.                                                                                (
  924.                                                                                m
  925.                                                      |          |          |   )
  926.                                       ||Null Trap   40@G(m)s   61@G(m)s   36@G(s
  927.                                       ||             |          |          |   |
  928.                                       ||         |           |  |          |
  929.                                                                                9
  930.                                                                                @
  931.                                                                                G
  932.                                                                                (
  933.                                                                                m
  934.                                                                                )
  935.                                                                                s
  936.                                                                                8
  937.                                                                                5
  938.                                                                                @
  939.                                                                                G
  940.                                                                                (
  941.                                                                                m
  942.                                                  |           |                 )
  943.                                       ||Trap to Unix   61@G(m)s | 61@G(m)s | 11s
  944.                                       ||         |           |  |          |
  945.                                       ||         |           |  |          |
  946.                                       ||Null RPC | 310@G(m)s |  | 83@G(m)s |
  947.                                       ||         |           |  |          |
  948.                                       --
  949.  
  950.                         Table 5-2:  Trap and RPC times
  951.  
  952.                The primary measurement we are  concerned  with  in
  953.              this  paper  is read() and write() throughput.  Table
  954.              5-3 measures  throughput  on  all  four  systems  for
  955.              moving  data  to  and from disk plus the extrapolated
  956.              time it took for each 4096 byte page.   The  read()'s
  957.              and write()'s were large enough so no caching effects
  958.              would be seen.  As can be seen, the only  case  where
  959.              the kernelized system does not perform as well as the
  960.              monolithic system  is  the  Mach  3.0  write()  which
  961.              performs 6% slower.
  962.  
  963.  
  964.                                       --
  965.                                       || |          |          |               |
  966.                                                                |
  967.                                       || | HP Vectra|     Compaq               |
  968.                                       || |          |          |               |
  969.                                       ||     |           |           |         |
  970.                                                                                |
  971.                                                                                S
  972.                                                                                V
  973.                                                                                R
  974.                                                                                4
  975.                                              |           |           |         .
  976.                                       ||   Mach 3.0   Mach 2.6   CHORUS/MiX V.40
  977.                                       ||     |           |           |         |
  978.                                       || |        |        |        |
  979.                                                                                c
  980.                                                                                2
  981.                                                                                7
  982.                                                                                0
  983.                                                                                K
  984.                                                                                B
  985.                                                                                /
  986.                                                                                s
  987.                                          |        |        |                   e
  988.                                       ||Read   320KB/sec   320KB/sec|  270KB/sec
  989.                                       || |        |        |        |
  990.                                       ||      |           |           |        |
  991.                                               |                       |
  992.                                       ||   12.5ms   12.5ms|  14.8ms   14.8ms   |
  993.                                       ||      |           |           |        |
  994.                                       || |        |        |        |
  995.                                                                                e
  996.                                                                                c
  997.                                                                                2
  998.                                                                                5
  999.                                                                                0
  1000.                                                                                K
  1001.                                                                                B
  1002.                                                                                /
  1003.                                                                                s
  1004.                                          |        |                 |          e
  1005.                                       ||Write   300KB/sec  |320KB/sec   250KB/sc
  1006.                                       || |        |        |        |
  1007.                                       || |        |        |        |
  1008.                                       || | 13.3ms | 12.5ms | 16.0ms | 16.0ms
  1009.                                       || |        |        |        |
  1010.                                       --
  1011.  
  1012.                      Table 5-3:  Read and Write Throughput
  1013.  
  1014.                To approximate the cost of the code path for read()
  1015.              and write() we measured the cost of read()'s  without
  1016.              requiring  disk  access.    For  this  test  we did a
  1017.              sequential  read  of  a  file  of   approximately   2
  1018.              megabytes in size for the kernelized systems and SVR4
  1019.              and a file as large as possible and still able to fit
  1020.              into  the buffer cache for Mach 2.6.  Table 5-4 shows
  1021.              these results.
  1022.  
  1023.  
  1024.                                       --
  1025.                                       ||         |          |                |
  1026.                                                             |
  1027.                                       ||HP Vectra|     Compaq                |
  1028.                                       ||         |          |                |
  1029.                                       ||         |          |          |
  1030.                                                                                S
  1031.                                                                                V
  1032.                                                                                R
  1033.                                                                                4
  1034.                                                                        |       .
  1035.                                       ||Mach 3.0 | Mach 2.6 | CHORUS/MiX V.4   0
  1036.                                       ||         |          |          |
  1037.                                       ||          |           |            |
  1038.                                                               |            |   e
  1039.                                       ||4.3M/sec  |4.3M/sec   3.3M/sec   3.0M/sc
  1040.                                       ||          |           |            |
  1041.                                       ||          |           |            |
  1042.                                                                                0
  1043.                                                                                0
  1044.                                                                                @
  1045.                                                                                G
  1046.                                                                                (
  1047.                                                                                m
  1048.                                                                                )
  1049.                                       ||900@G(m)s | 900@G(m)s | 1100@G(m)s | 13s
  1050.                                       ||          |           |            |
  1051.                                       --
  1052.  
  1053.                       Table 5-4:  Cached Read Throughput
  1054.  
  1055.                The next benchmark measures the cost  for  repeated
  1056.              calls to read() or write() of one byte with a lseek()
  1057.              between each iteration.  So that the lseek() time can
  1058.              be  removed  for  further comparisons, a benchmark to
  1059.              measure lseek() time is included.   Table  5-5  shows
  1060.              the  results  of  these  tests.  The  read  time  for
  1061.              CHORUS/MiX V.4 is consistent with the equivalent time
  1062.              measured     for     SVR4:          the    difference
  1063.              (80@G(m)s)corresponds roughly to the additional  cost
  1064.              of  the trap handling (34@G(m)s for the seek call and
  1065.              for the read call).  Among the four systems,  all  of
  1066.              them except SVR4 exhibit equivalent times for reading
  1067.              and writing one byte. The reason why SVR4 writes much
  1068.              faster one byte than it reads it, is quite unclear.
  1069.  
  1070.                Table  5-4  measured the cost of reading 4096 bytes
  1071.              from a file when  reading  sequentially  through  the
  1072.              entire  file.  The difference between that result and
  1073.              the  results  shown  in  table  5-5  should  be   the
  1074.              difference  of an uncached and a cached bcopy and the
  1075.              addition of a fast  page-fault  resolved  in  the  VM
  1076.              cache.    For  the  Mach  3.0  system  table 5-4 also
  1077.              includes the cost of a mapping window change every 16
  1078.  
  1079.  
  1080.                                       --
  1081.                                       || |          |          |               |
  1082.                                                                |
  1083.                                       || | HP Vectra|     Compaq               |
  1084.                                       || |          |          |               |
  1085.                                       ||      |          |          |          |
  1086.                                                                                |
  1087.                                                                                S
  1088.                                                                                V
  1089.                                                                                R
  1090.                                                                                4
  1091.                                               |          |          |          .
  1092.                                       ||   Mach 3.0   Mach 2.6   CHORUS/MiX V.40
  1093.                                       ||      |          |          |          |
  1094.                                       ||     |           |           |         |
  1095.                                                                                |
  1096.                                                                                1
  1097.                                                                                2
  1098.                                                                                1
  1099.                                                                                @
  1100.                                                                                G
  1101.                                                                                (
  1102.                                                                                m
  1103.                                                                                )
  1104.                                       ||Lseek|  95@G(m)s | 79@G(m)s  |155@G(m)ss
  1105.                                       ||     |           |           |         |
  1106.                                       ||      |           |           |        |
  1107.                                                                                |
  1108.                                                                                s
  1109.                                                                                6
  1110.                                                                                3
  1111.                                                                                0
  1112.                                                                                @
  1113.                                                                                G
  1114.                                                                                (
  1115.                                                                                m
  1116.                                                                                )
  1117.                                       ||Read  |210@G(m)s  |390@G(m)s  |710@G(m)s
  1118.                                       ||      |           |           |        |
  1119.                                       ||      |           |           |        |
  1120.                                                                                |
  1121.                                                                                )
  1122.                                                                                s
  1123.                                                                                4
  1124.                                                                                2
  1125.                                                                                0
  1126.                                                                                @
  1127.                                                                                G
  1128.                                                                                (
  1129.                                                                                m
  1130.                                                                                )
  1131.                                       ||Write | 200@G(m)s | 380@G(m)s | 720@G(ms
  1132.                                       ||      |           |           |        |
  1133.                                       --
  1134.  
  1135.                     Table 5-5:  Cached Read and Write Times
  1136.  
  1137.              iterations of 4096 bytes.  To account for the mapping
  1138.              window change operation in Mach 3.0 with  the  BSD4.3
  1139.              Single  Server,  a test was run which lseek()ed 61440
  1140.              bytes after each 4096 byte read to  force  a  mapping
  1141.              operation on each read().  This resulted in a cost of
  1142.              2250@G(u)s for each iteration including  the  lseek()
  1143.              cost.    By looking at 16 reads covering 64KB, we can
  1144.              extrapolate the cost of just  the  mapping  operation
  1145.              and  the  cost  of a page-fault.  The measured result
  1146.              from table 5-4 is 900@G(m)s times 16  which  must  be
  1147.              equal  to  2250@G(m)s  plus  15  times  the  quantity
  1148.              115@G(m)s, from table 5-5, plus  379@G(us)  plus  the
  1149.              page-fault  time.    From  this, the cost of the fast
  1150.              page-fault time is 316@G(m)s.  By breaking  down  the
  1151.              2250@g(m)s  measurement,  we  get  the  cost  of  the
  1152.              mapping operation to be 1440@G(m)s.
  1153.  
  1154.                Another test of interest both for understanding the
  1155.              break down of read() costs and for comparison between
  1156.              the kernelized systems and monolithic systems is  the
  1157.              reading  of  data  directly from raw disk partitions.
  1158.              Table 5-6 shows the throughput  and  per  4096k  byte
  1159.              page  performance  of  Mach  3.0  and  Mach  2.6  for
  1160.              different size reads.  When these tests were run with
  1161.              block  increments  of  one  between  each  read,  the
  1162.              performance was lower than that actually measured for
  1163.              a  full  read().   This result is consistent with the
  1164.              BSD4.3 Single Server's uses of readahead  which  will
  1165.              not  consistently  miss disk rotations like this test
  1166.              must have.  To account for this and  better  simulate
  1167.              what  is  happening  in  the  BSD4.3  Single  Server,
  1168.              various block increments from one to eight times  the
  1169.              data   size  were  used  in  the  benchmark  and  the
  1170.              increment  which  produced  the   best   result   was
  1171.              reported.   An interesting point about the results is
  1172.              Mach 2.6 reads from raw  partitions  slower  than  it
  1173.              reads from Unix files.
  1174.  
  1175.  
  1176.                                       --
  1177.                                       ||         |        |        |       |   |
  1178.                                                  |                 |       |
  1179.                                       ||Bytes   4KB   8KB | 16KB   32KB   64KB |
  1180.                                       ||         |        |        |       |   |
  1181.                                                                                |
  1182.                                       ||              |           |           ||
  1183.                                                                                |
  1184.                                                                                |
  1185.                                                                                5
  1186.                                                                                m
  1187.                                                                                s
  1188.                                                                                6
  1189.                                                                                .
  1190.                                                                                5
  1191.                                                       |                       |m
  1192.                                       ||Mach 3.0   10.5ms   10.0ms|  7.5ms   7.s
  1193.                                                                                |
  1194.                                       ||              |           |           ||
  1195.                                       ||         |        |        |        |  |
  1196.                                                                                |
  1197.                                                                                5
  1198.                                                                                3
  1199.                                                                                0
  1200.                                                                                K
  1201.                                                                                B
  1202.                                                                                /
  1203.                                                                                s
  1204.                                                                                e
  1205.                                                                                c
  1206.                                                                                5
  1207.                                                                                3
  1208.                                                                                0
  1209.                                                                                K
  1210.                                                                                B
  1211.                                                                                /
  1212.                                                                                s
  1213.                                                                                e
  1214.                                                                                c
  1215.                                                                                6
  1216.                                                                                2
  1217.                                                                                0
  1218.                                                                                K
  1219.                                                                                B
  1220.                                                                                /
  1221.                                                                                s
  1222.                                                  |        |                 |  e
  1223.                                       ||device_read()   380KB/sec  |410KB/sec  c
  1224.                                       ||         |        |        |        |  |
  1225.                                                                                |
  1226.                                       ||       |           |           |       |
  1227.                                                                                |
  1228.                                                                                |
  1229.                                                                                4
  1230.                                                                                .
  1231.                                                                                3
  1232.                                                                                m
  1233.                                                                                s
  1234.                                                                                1
  1235.                                                                                4
  1236.                                                                                .
  1237.                                                                                3
  1238.                                                |                       |       m
  1239.                                       ||Mach 2.6   14.3ms  |14.3ms   14.3ms   1s
  1240.                                                                                |
  1241.                                       ||       |           |           |       |
  1242.                                                                                |
  1243.                                       ||       |           |           |       |
  1244.                                                                                |
  1245.                                                                                |
  1246.                                                                                s
  1247.                                                                                e
  1248.                                                                                c
  1249.                                                                                2
  1250.                                                                                8
  1251.                                                                                0
  1252.                                                                                K
  1253.                                                                                B
  1254.                                                                                /
  1255.                                                                                s
  1256.                                                                                e
  1257.                                                                                c
  1258.                                                                                2
  1259.                                                                                8
  1260.                                                                                0
  1261.                                                                                K
  1262.                                                                                B
  1263.                                                                                /
  1264.                                                                                s
  1265.                                                                                e
  1266.                                       ||read() | 280KB/sec | 280KB/sec | 280KB/c
  1267.                                                                                |
  1268.                                       ||       |           |           |       |
  1269.                                       --
  1270.  
  1271.                        Table 5-6:  Raw Read Performance
  1272.  
  1273.                The  CHORUS  Nucleus  does  not  provide any direct
  1274.              access to  devices.    MiX  Object  Manager  accesses
  1275.              directly   the   disk   driver   as   a  native  Unix
  1276.              implementation   does,   through   a    bdevsw/cdevsw
  1277.              interface.    Tests  were  done  to  measure the disk
  1278.              throughput from within the OM using 4KB, 8KB 16KB and
  1279.              32KB  transfers.    The test was run in two different
  1280.              ways:    the  first  run   was   reading   the   disk
  1281.              sequentially  while the second run was always reading
  1282.              the same block of the disk. As the controller  as  an
  1283.              internal  cache  reading  the  same block goes faster
  1284.              than reading the disk sequentially.
  1285.  
  1286.  
  1287.                                       --
  1288.                                       ||           |       |       |       |
  1289.                                                                    |
  1290.                                       ||Bytes   4KB|  8KB  |16KB   32KB    |
  1291.                                       ||           |       |       |       |
  1292.                                       ||     |           |           |         |
  1293.                                                                                |
  1294.                                                                                1
  1295.                                              |           |           |         m
  1296.                                       ||Sequential   7.1ms   7.1ms   7.1ms   7.s
  1297.                                       ||     |           |           |         |
  1298.                                       ||           |        |        |        |
  1299.                                                                                c
  1300.                                                                                5
  1301.                                                                                6
  1302.                                                                                0
  1303.                                                                                K
  1304.                                                                                B
  1305.                                                                                /
  1306.                                                                                s
  1307.                                                    |        |                 |e
  1308.                                       ||read   560KB/sec   560KB/sec | 560KB/sec
  1309.                                       ||           |        |        |        |
  1310.                                       ||     |           |           |         |
  1311.                                                                                |
  1312.                                                                                4
  1313.                                                                                .
  1314.                                                                                0
  1315.                                                                                0
  1316.                                              |           |                     m
  1317.                                       ||Same Block   4.49ms   4.19ms | 4.10ms  s
  1318.                                       ||     |           |           |         |
  1319.                                       ||     |           |           |         |
  1320.                                                                                |
  1321.                                                                                c
  1322.                                                                                9
  1323.                                                                                9
  1324.                                                                                0
  1325.                                                                                K
  1326.                                                                                B
  1327.                                                                                /
  1328.                                                                                s
  1329.                                                                                e
  1330.                                       ||read | 890KB/sec | 952KB/sec | 975KB/sec
  1331.                                       ||     |           |           |         |
  1332.                                       --
  1333.  
  1334.                 Table 5-7:  CHORUS/MiX V.4 Raw Read Performance
  1335.  
  1336.                As it was difficult to get  the  same  measure  for
  1337.              Unix  SVR4,  we  measured the disk throughput through
  1338.              the raw disk interface  using  standard  read  system
  1339.              calls,  the throughput achieved is 530KB/sec for 4096
  1340.              byte pages.
  1341.  
  1342.                The results in table 5-8 were gathered to show  the
  1343.              combined  effect  of  reading from disk and supplying
  1344.              the data to the VM system and to show what  potential
  1345.              improvements  could be made by tuning the file system
  1346.              implementation to the kernelized architecture.    The
  1347.              Data_Provided       column       corresponds       to
  1348.              memory_object_data_provided() the obsolete call  that
  1349.              is  used  in the current implementation.  Data_Supply
  1350.              corresponds to memory_object_data_supply(),  the  new
  1351.              Mach  call  which  has  the previously mentioned page
  1352.              stealing optimization.  Like the results  from  table
  1353.              5-6,  the block increment was adjusted to remove disk
  1354.              rotation  misses.    Both   tests   reached   maximum
  1355.              throughput  of  530KB/sec at 16k reads and maintained
  1356.              that speed for larger block sizes.
  1357.  
  1358.  
  1359.                                       --
  1360.                                       ||
  1361.                                       ||Comparison of Mach Per Page Fault Cost
  1362.                                       ||
  1363.                                       ||              |        |        |
  1364.                                                       |        |
  1365.                                       ||Bytes   4KB   8KB   16KB        |
  1366.                                       ||              |        |        |
  1367.                                       || |           |           |
  1368.                                          |                       |
  1369.                                       ||Data_Provided|  12.1ms   10.0ms   7.5ms
  1370.                                       || |           |           |
  1371.                                       ||            |        |        |
  1372.                                                              |        |
  1373.                                       ||   330KB/sec|  400KB/sec   530KB/sec
  1374.                                       ||            |        |        |
  1375.                                       || |           |           |
  1376.                                          |                       |
  1377.                                       ||Data_Supply  |11.5ms   10.0ms   7.5ms
  1378.                                       || |           |           |
  1379.                                       || |           |           |
  1380.                                       || | 346KB/sec | 410KB/sec | 530KB/sec
  1381.                                       || |           |           |
  1382.                                       --
  1383.  
  1384.               Table 5-8:  Mach 3.0 Data_Provided and Data_Supply
  1385.  
  1386.                Measures have been taken within the CHORUS  Nucleus
  1387.              to measure the cost of a pullIn operation: a loop for
  1388.              loading the same from the Mapper in  physical  memory
  1389.              has  been  measured:  this  includes the RPC from the
  1390.              CHORUS Nucleus to the  Mapper  (83@G(m)s).  This  has
  1391.              been  run  with  a  4096  byte  page  size.  The time
  1392.              reported is  5ms  which  leads  to  a  throughput  of
  1393.              800KB/sec.  As  this  test  doesn't really access the
  1394.              disk but only  the  cache  of  the  controller,  this
  1395.              figures  must  be compared to the figures achieved by
  1396.              reading continually the same block of 4096 bytes from
  1397.              the  raw  disk (4.49 ms, and 890KB/sec). The overhead
  1398.              introduced by the Object Manager for loading page can
  1399.              then  be  deduced  as  5ms - 4.49 ms: 0.51 ms.  These
  1400.              510@G(m)s comprise the 83@G(m)s due to the  RPC  from
  1401.              the  Nucleus  to  the  OM.  Thus, the actual overhead
  1402.              induced by the OM remains to some 430@G(m)s.
  1403.  
  1404.                To bring together  all  of  the  previous  results,
  1405.              table  5-9 shows a break down of the read() path with
  1406.              associated costs.  The  micro-benchmark  total  comes
  1407.              out  only  4% higher than the measured result.  Since
  1408.              the    measurements     for     device_read()     and
  1409.              memory_object_data_provided()     are     only     an
  1410.              approximation, the measured and projected totals  can
  1411.              be  considered  the  same.  The Mach 2.6 numbers were
  1412.              included for comparison.  Since there is no easy  way
  1413.              to  measure  the  internal  access  time  to the disk
  1414.              driver  for  reading,  an  extrapolated   value   was
  1415.              supplied  for read which yielded a identical measured
  1416.              and projected total.
  1417.  
  1418.                While  the  end  measured  result  for  read()  and
  1419.              write()  performance is the same in Mach 3.0 with the
  1420.              BSD4.3 Single Server and Mach 2.6 MSD(BSD4.3),  table
  1421.              5-9 shows a result which may question scalability the
  1422.              result under load.  Because the disk  latency  is  so
  1423.              high,   the  262%  increase  in  processing  overhead
  1424.              necessary in the  BSD4.3  Single  Server  is  hidden.
  1425.  
  1426.  
  1427.                                       --
  1428.                                       || |          |
  1429.                                          |          |                          s
  1430.                                       ||Operation   Time (@G(m)s)   Time (@G(m))
  1431.                                       || |          |
  1432.                                       ||             |    |
  1433.                                       ||   Mach 3.0  |Mach|2.6
  1434.                                       ||             |    |
  1435.                                       ||           |    |
  1436.                                                    |    |
  1437.                                       ||Trap to Unix   61   61
  1438.                                       ||           |    |
  1439.                                       ||                    |    |
  1440.                                                             |
  1441.                                       ||Misc Costs   54   250    |
  1442.                                       ||                    |    |
  1443.                                       ||          |     |
  1444.                                                   |     |
  1445.                                       ||1/16th Remap Window   90   N/A
  1446.                                       ||          |     |
  1447.                                       ||               |       |
  1448.                                       ||Pagefault   316|  N/A  |
  1449.                                       ||               |       |
  1450.                                       ||              |      |
  1451.                                                              |
  1452.                                       ||Read from Disk|  10500   11810
  1453.                                       ||              |      |
  1454.                                       ||                       |     |
  1455.                                                                |
  1456.                                       ||Data Provided   1600   N/A   |
  1457.                                       ||                       |     |
  1458.                                       ||                    |      |
  1459.                                                             |      |
  1460.                                       ||Bcopy Uncached to User   379   379
  1461.                                       ||                    |      |
  1462.                                       ||      |       |
  1463.                                               |
  1464.                                       ||Total w/o Disk|Read   2500   690
  1465.                                       ||      |       |
  1466.                                       ||               |       |
  1467.                                       ||Total   13000  |12500  |
  1468.                                       ||               |       |
  1469.                                       ||               |       |
  1470.                                       ||Measured Total | 12500 | 12500
  1471.                                       ||               |       |
  1472.                                       --
  1473.  
  1474.              Table 5-9:  Mach 3.0 with the BSD4.3 Single Server Re
  1475.  
  1476.              Further  measurements  should  look  at  whether  the
  1477.              effects of this  increased  processing  outweigh  the
  1478.              benefits  seen in cached performance where the BSD4.3
  1479.              Single Server read() overhead is only 54% of the Mach
  1480.              2.6 MSD(BSD4.3) read() overhead.
  1481.  
  1482.              6. Conclusions
  1483.  
  1484.  
  1485.  
  1486.              6.1. Compromises
  1487.                The   kernelized   systems   have   achieved  their
  1488.              performance in a number of cases by compromising some
  1489.              of their modularity and portability goals.
  1490.  
  1491.                Mach  3.0  with  the  BSD4.3  Single  Server  makes
  1492.              liberal use of the shared memory  pages  between  the
  1493.              BSD4.3  Single  Server  and Emulation Library.  While
  1494.              this works well on a uniprocessor  or  shared  memory
  1495.              multiprocessor,  it  would not work well on a NUMA or
  1496.              NORMA machine.  The mapping information which is used
  1497.              by the Emulation Library could be updated by messages
  1498.              instead of  being  written  directly  by  the  BSD4.3
  1499.              Single  Server.    This  would  eliminate the passive
  1500.              Token state optimization since there is no  mechanism
  1501.              for  an  upcall  from the BSD4.3 Single Server to the
  1502.              Emulation  Library.    A  dedicated  thread  in   the
  1503.              Emulation   Library  for  upcalls  would  solve  this
  1504.              problem but with the cost  of  adding  an  additional
  1505.              thread   creation  at  each  fork()  call.    Another
  1506.              solution would be to have a  proxy  task  running  on
  1507.              each  node  on  behalf of the BSD4.3 Single Server to
  1508.              share the  memory  with  the  Emulation  Library  and
  1509.              respond  to  upcalls.    The  cost  here  would be at
  1510.              startup in the creation of  an  additional  task  per
  1511.              node.
  1512.  
  1513.                CHORUS/MiX  V.4  is  capable of runnings its system
  1514.              servers in either  supervisor  or  user  mode.    The
  1515.              configuration   used   for   the   previous  sections
  1516.              measurements was the version where the servers reside
  1517.              in  supervisor  mode.    This  results  in no context
  1518.              switches and  faster  IPC  times  to  read  or  write
  1519.              from/to the disk. Moreover, CHORUS/MiX V.4 servers do
  1520.              not share any memory, thus it is quite easy to make a
  1521.              component  evolve  without changing the other servers
  1522.              as  long  as  the  protocol  between   them   remains
  1523.              unchanged.  The configuration where CHORUS/MiX V.4 is
  1524.              running with its servers in user  mode  is  primarily
  1525.              intended  to  be used for debugging purposes, thus no
  1526.              particular attention has been  paid  yet  to  achieve
  1527.              similar performances in such a configuration. However
  1528.              some experiments  have  been  done  in  the  previous
  1529.              release  of  MiX (MiX V3.2) to measure the additional
  1530.              costs that such a configuration will imply.   Further
  1531.              details can be found in [3].
  1532.  
  1533.                One  of  the  key point in the design of CHORUS/MiX
  1534.              V.4 has been the introduction of the message  handler
  1535.              mechanism. However, this mechanism should be extended
  1536.              to work whether the receiver of a message is  running
  1537.              in supervisor address space or user address space.
  1538.  
  1539.  
  1540.  
  1541.              6.2. Cross Pollenation
  1542.                A number of techniques used by CHORUS/MiX V.4 could
  1543.              readily be adopted by Mach 3.0 with the BSD4.3 Single
  1544.              Server.   The movement of device drivers such as disk
  1545.              drivers out of the kernel  or  nucleus  into  systems
  1546.              servers is one good example of this.  By locating the
  1547.              device manipulation code in the same task which needs
  1548.              the  data,  context  switches  and data copies can be
  1549.              avoided.  For this to really work  on  a  Mach  based
  1550.              system,  the device driver needs to really be able to
  1551.              run in user mode where systems servers are run.  This
  1552.              is  feasible  on  architectures which allow user mode
  1553.              access to device registers such  as  the  R2000/R3000
  1554.              based  DECstation  and  80386/80486  based platforms.
  1555.              The current version of the BSD4.3 Single  Server  for
  1556.              the  DECstation  platform  uses  a user mode ethernet
  1557.              driver and preliminary work has been done  on  moving
  1558.              disk drivers.
  1559.  
  1560.                Another  technique  which CHORUS/MiX V.4 uses which
  1561.              could be adopted by Mach 3.0 with the  BSD4.3  Single
  1562.              Server  is  the  concept of a handler.  By having the
  1563.              kernel  redirect  the  trap  directly  into   another
  1564.              address  space,  CHORUS avoids the protection problem
  1565.              the BSD4.3  Single  Server  has  with  the  Emulation
  1566.              Library  and  avoids the associated RPC needed by the
  1567.              Emulation Library to cross  into  a  trusted  server.
  1568.              The  question  about  this  technique, is whether the
  1569.              additional cost of always  redirecting  into  another
  1570.              address  space  outweighs  the cost of the occasional
  1571.              RPC.  Since Mach 3.0 servers are run  in  user  mode,
  1572.              the  cost of this redirection may turn out to be much
  1573.              higher than that seen by CHORUS for  the  redirection
  1574.              into a supervisor mode actor.
  1575.  
  1576.                Mach  2.6  MSD(BSD4.3)  could benefit from a mapped
  1577.              file system using the  Emulation  Library  technique.
  1578.              This  will  only  work  because  it  already  has the
  1579.              complex VM system, a fast IPC, and the Trap Emulation
  1580.              mechanism  that  resides  in  Mach  3.0.  In general,
  1581.              monolithic systems can  not  benefit  the  kernelized
  1582.              techniques  because  they  do  not have the necessary
  1583.              mechanisms  for  building  system  servers  with  new
  1584.              structures.
  1585.  
  1586.                To  fully  compare the two approaches taken by Mach
  1587.              3.0 and CHORUS, one could use the CHORUS Trap Handler
  1588.              mechanism  to  implement an Emulation Library instead
  1589.              of a Process Manager in CHORUS.  As  long  as  device
  1590.              drivers  are  part  of  CHORUS  subsystems'  specific
  1591.              actors,  it  will  be  difficult  to  have   multiple
  1592.              subsystems  running  simultaneously  sharing the same
  1593.              devices.  The isolation of the  drivers  out  of  the
  1594.              servers  as  done  in  Mach  would help to solve this
  1595.              issue. This has been experimented in CHORUS/MiX  V3.2
  1596.              and described in [3].
  1597.  
  1598.  
  1599.  
  1600.              6.3. Final Words
  1601.                Section  5  shows  that  Mach  3.0  with the BSD4.3
  1602.              Single  Server  and  CHORUS/MiX  V.4  have   achieved
  1603.              performance in the movement of data comparable to the
  1604.              monolithic systems which they  are  compatible  with.
  1605.              In no case was read() or write() throughput less then
  1606.              94% of the  performance  of  the  monolithic  system.
  1607.              Many of the micro-benchmarks clearly indicated better
  1608.              performance on kernelized systems for  certain  types
  1609.              of cached access.
  1610.  
  1611.                There  is  also still clear room for improvement in
  1612.              Mach 3.0 with the BSD4.3 Single Server.  By moving to
  1613.              the   memory_object_data_supply()   call   from   the
  1614.              obsolete interface and better optimizing  read  sizes
  1615.              and readahead for the performance of the microkernel,
  1616.              disk throughput could approach 600KB/sec or almost  a
  1617.              100%  improvement  over  the  existing  BSD4.3 Single
  1618.              Server and Mach 2.6 MSD(BSD4.3) systems.
  1619.  
  1620.                CHORUS/MiX V.4 may  also  expect  some  significant
  1621.              improvement since no readahead is used in the systems
  1622.              that have been described and measured.   Pages  being
  1623.              pushed  out  to  the  disk are written synchronously,
  1624.              adding some  asynchronicity  should  help  to  handle
  1625.              multiple  disk  access  more gracefully by making the
  1626.              disk sort algorithm much more useful.
  1627.  
  1628.                Regarding  the  history  of   microkernels,   their
  1629.              current   performance   has   been  achieved  through
  1630.              multiple iterations which allows them to now be  used
  1631.              in  commercial  products  as  opposed  to  just being
  1632.              interesting research tools.  Yet,  microkernel  based
  1633.              systems  are  still very young and have not benefited
  1634.              from the thousands of man-years that have been  spent
  1635.              to  make  monolithic systems as fast as they are now.
  1636.              Even as young as they are, we believe that kernelized
  1637.              systems have shown themselves to be both flexible and
  1638.              fast enough for the challenging task of building file
  1639.              systems  and  moving data.  You can only imagine what
  1640.              kernelized systems will look like a  few  years  from
  1641.              now,  after  receiving  a fraction of the effort that
  1642.              has gone into monolithic systems in the past.
  1643.  
  1644.              7. Availability
  1645.                Mach 3.0 is free and available  for  anonymous  FTP
  1646.              from   cs.cmu.edu.    The  BSD4.3  Single  Server  is
  1647.              available free to anyone with an AT&T source license.
  1648.              Contact  mach@cs.cmu.edu  for information.  CHORUS is
  1649.              available   from   CHORUS    Systemes.        Contact
  1650.              info@chorus.fr  for  licensing  information.  Reports
  1651.              and documentation is freely accessible  by  anonymous
  1652.              FTP from opera.chorus.fr.
  1653.  
  1654.              8. Acknowledgements
  1655.                We  would  like  to  thank  those who have read and
  1656.              commented on this paper throughout  its  development.
  1657.              In particular, we thank Dr. J. Karohl, Brian Bershad,
  1658.              Jim Lipkis, Michel Gien, Marc Rozier, Brian Zill  and
  1659.              especially Peter Stout.
  1660.                                   REFERENCES
  1661.  
  1662.              [1]   Abrossimov V., Rozier M., Shapiro M.
  1663.                    Generic Virtual Memory Management for Operating
  1664.                       System Kernels.
  1665.                    In Proceedings of the Twelvth ACM Symposium on
  1666.                       Operating Systems Principles.  December,
  1667.                       1989.
  1668.  
  1669.              [2]   Armand F., Gien M., Herrmann F., Rozier M.
  1670.                    Revolution 89: or Distributing Unix brings it
  1671.                       back to its Original Virtue.
  1672.                    In Proceedings WEDMS I.  October, 1989.
  1673.  
  1674.              [3]   Francois Armand.
  1675.                    Give a Process Manager to your drivers!
  1676.                    In Proceedings of EurOpen Autumn 1991.
  1677.                       September, 1991.
  1678.  
  1679.              [4]   Baron, R.V. et al.
  1680.                    MACH Kernel Interface Manual.
  1681.                    Technical Report, School of Computer Science,
  1682.                       Carnegie Mellon University, September, 1988.
  1683.  
  1684.              [5]   Joseph S. Barrera III.
  1685.                    Kernel Support for Distrubted Memory
  1686.                       Multiprocessors.
  1687.                    PhD thesis, School of Computer Science,
  1688.                       Carnegie Mellon University, To be published,
  1689.                       1992.
  1690.  
  1691.              [6]   Bricker, A., Gien, M., Guillemont, M., Lipkis,
  1692.                    J., Orr, D., Rozier, M.
  1693.                    A New Look at Microkernel-Based UNIX Operating
  1694.                       Systems: Lessons in Performance and
  1695.                       Compatibility.
  1696.                    In Proceedings of EurOpen Spring 1991
  1697.                       Conference.  May, 1991.
  1698.  
  1699.              [7]   Cheriton, D.R., Whitehead, G.R., Szynter, E.W.
  1700.                    Binary Emulation of UNIX using the V Kernel.
  1701.                    In Proceedings of Summer 1990 USENIX
  1702.                       Conference.  June, 1990.
  1703.  
  1704.              [8]   Chorus Systemes.
  1705.                    CHORUS Kernel v3 r4.0 Programmer's Reference
  1706.                       Manual.
  1707.                    Technical Report CS/TR-91-71, Chorus Systemes,
  1708.                       September, 1991.
  1709.  
  1710.              [9]   Rozier, M., et. al.
  1711.                    CHORUS Distrbuted Operating Systems.
  1712.                    Computing Systems 1(4), December, 1988.
  1713.  
  1714.              [10]  Chorus Systemes.
  1715.                    CHORUS Kernel v3 r4.0 Specification and
  1716.                       Interface.
  1717.                    Technical Report CS/TR-91-69, Chorus Systemes,
  1718.                       September, 1991.
  1719.  
  1720.              [11]  Eric C. Cooper and Richard P. Draves.
  1721.                    C Threads.
  1722.                    Technical Report CMU-CS-88-154, School of
  1723.                       Computer Science, Carnegie Mellon
  1724.                       University, February, 1988.
  1725.  
  1726.              [12]  Draves, R.P.
  1727.                    A Revised IPC Interface.
  1728.                    In Proceedings of the USENIX Mach Workshop,
  1729.                       pages 101-121.  October, 1990.
  1730.  
  1731.              [13]  Draves, R.P., Bershad, B., Rashid, R.F., Dean,
  1732.                    R.W.
  1733.                    Using Continuations to Implement Thread
  1734.                       Management and Communication in Operating
  1735.                       Systems.
  1736.                    In Proceedings of the Thirteenth ACM Symposium
  1737.                       on Operating Systems Principles.  April,
  1738.                       1991.
  1739.  
  1740.              [14]  Golub, D., Dean, R.W., Forin, A., Rashid, R.F.
  1741.                    Unix as an Application Program.
  1742.                    In Proceedings of Summer 1990 USENIX
  1743.                       Conference.  June, 1990.
  1744.  
  1745.              [15]  Guillemont M.
  1746.                    Real Time in a Distributed Computing
  1747.                       Environment.
  1748.                    Computer Technology Review , October, 1990.
  1749.  
  1750.              [16]  Habert, S., Mosseri, L., Abrossimov, V.
  1751.                    COOL:Kernel support for object oriented
  1752.                       environments.
  1753.                    In Proceedings of OOPSLA'90 - Canada Ottawa.
  1754.                       1990.
  1755.  
  1756.              [17]  Keith Loepere.
  1757.                    MACH 3 Kernel Principles.
  1758.                    Open Software Foundation and Carnegie Mellon
  1759.                       University, 1992.
  1760.  
  1761.              [18]  A. S. Tannenbaum and S. J. Mullender.
  1762.                    An Overview of the Amoeba Distributed Operating
  1763.                       System.
  1764.                    CWI Syllabus 9.
  1765.                    1982
  1766.  
  1767.              [19]  Tokuda, H., Nakajima, T., Rao, P.
  1768.                    Real-Time Mach: Towards a Predictable Real-Time
  1769.                       System.
  1770.                    In Proceedings of the First Mach USENIX
  1771.                       Workshop, pages 73--82.  October, 1990.
  1772.  
  1773.              [20]  Brent Welch.
  1774.                    The File System Belongs in the Kernel.
  1775.                    In Proceedings of the Second USENIX Mach
  1776.                       Symposium.  November, 1991.
  1777.  
  1778.              [21]  Michael Wayne Young.
  1779.                    Exporting a User Interface to Memory Management
  1780.                       from a Communication-Oriented Operating
  1781.                       System.
  1782.                    PhD thesis, School of Computer Science,
  1783.                       Carnegie Mellon University, November, 1989.
  1784.                                Table of Contents
  1785.              1. Introduction
  1786.              2. Microkernel Abstractions
  1787.              3. System Servers
  1788.                   3.1. Mach 3.0 with the BSD4.3 Single Server
  1789.                        3.1.1. BSD4.3    Single   Server   and
  1790.                               Emulation Library Structure
  1791.                        3.1.2. Mapped Files
  1792.                   3.2. CHORUS/MiX V.4
  1793.                        3.2.1. The CHORUS/MiX V.4 subsystem
  1794.                        3.2.2. Regular  File   Management   in
  1795.                               CHORUS/MiX V.4
  1796.                        3.2.3. File Size Management
  1797.              4. Read() and Write() Path Analysis
  1798.                   4.1. Mach 3.0 with the BSD4.3 Single Server
  1799.                        read() Path
  1800.                        4.1.1. Read() in the Emulation Library
  1801.                        4.1.2. Read()  in  the  BSD4.3  Single
  1802.                               Server
  1803.                   4.2. Mach 3.0 with the BSD4.3 Single Server
  1804.                        write() Path
  1805.                   4.3. CHORUS/MiX V.4 read() Path
  1806.                        4.3.1. Process Manager
  1807.                        4.3.2. CHORUS Nucleus
  1808.                        4.3.3. Mapper
  1809.                   4.4. CHORUS/MiX V.4 write() Path
  1810.              5. Performance
  1811.              6. Conclusions
  1812.                   6.1. Compromises
  1813.                   6.2. Cross Pollenation
  1814.                   6.3. Final Words
  1815.              7. Availability
  1816.              8. Acknowledgements
  1817.                                 List of Figures
  1818.              Figure 3-1:   A System Call in Mach 3.0 with the
  1819.                            BSD4.3 Single Server
  1820.              Figure 3-2:   CHORUS/MiX V.4 subsystem
  1821.              Figure 4-1:   Mach  3.0  with  the BSD4.3 Single
  1822.                            Server Mapped File Read
  1823.              Figure 4-2:   CHORUS/MiX V.4 read path
  1824.                                 List of Tables
  1825.              Table 5-1:   Bcopy of 4096 bytes
  1826.              Table 5-2:   Trap and RPC times
  1827.              Table 5-3:   Read and Write Throughput
  1828.              Table 5-4:   Cached Read Throughput
  1829.              Table 5-5:   Cached Read and Write Times
  1830.              Table 5-6:   Raw Read Performance
  1831.              Table 5-7:   CHORUS/MiX V.4 Raw Read Performance
  1832.              Table 5-8:   Mach    3.0    Data_Provided    and
  1833.                           Data_Supply
  1834.              Table 5-9:   Mach  3.0  with  the  BSD4.3 Single
  1835.                           Server Read() Path
  1836.