Organization: University of Maine System
Date: Monday, 14 Sep 1992 19:43:38 EDT
From: Andrew T. Robinson <ANDY@MAINE.MAINE.EDU>
Newsgroups: comp.os.os2.advocacy
Subject: Re: OS/2 2.0 + Mach 3.0 ?
Distribution: comp
 <1992Sep12.042910.6722@fcom.cc.utah.edu> <92258.142900ANDY@MAINE.MAINE.EDU>
 <1992Sep14.200027.3755@fcom.cc.utah.edu>

>Now... have you had the same sort of experience, or are you blowing hot air?
>
>Note... that the Mach that is in NextStep is much different than that in
>Mach 3.0.  The Mach in NeXT is a mono-lithic kernel that has only
>a micro-kernel flavor in the way the code is modularized.  Mach 3.0 is
>a full-fledged micro-kernel.
>
  You've got me there--my experience has been with the Next.  However,
  whether or not Next has a microkernel or just tastes like it does, NextStep
  was fairly snappy (about as good as my ps/2 55sx running Windows 3.1) in
  4Mb RAM, and when we bumped the machine to 8Mb it fairly flew.

>Mach chose (due to the "religion" of its designers) a model that gives poor
>performance.  There is no reason why Mach could not have chosen a model
>similar to NT's.  For that matter there are a couple of European vendors
>that do use a model similar to NT's.
>
  First, as you probably know and understand, "NT's" model is a poor
  performer compared to previous OSs, such as DOS.  You add functionality
  at the cost of efficiency.  You are using an attitude of convenience
  here, and one that is about 20 years old... I.e., that software should
  be designed to make efficient use of the hardware.  I'm sure Mach's
  model is implemented in an efficient manner (or could be)--but the extra
  functionality comes at a performance premium... MAYBE.

>Mach chose a model whereby each system call forces 2 context switches, and on
>any currently known/available architecture, context switches are expensive.
>This is particularly true on RISC systems.
>
  Well, in an MP environment you could run the security server on a
  dedicated processor and the context switch would be no more than
  putting the calling process to sleep--which is NOT that expensive :-)

>There are other elements in the two designs that fall along the same lines...
>NT chose performance, Mach chose religion.
>
  Phrased another way, NT chose expediency, and the designers of Mach chose
  to do it right.  It all depends on your point of view.

>For example consider under Mach 3.0 a read system call:
>        {User Process}   {File Server Process}  {Security Server Process}
>-----------------border between kernel and user execution rings----------
>                        {Micro Kernel}
>
>The User Process calls through the MK to the File Server (a context switch),
>The File Server calls the Security Server to authenticate the user
>(a context switch), which does the authentication and returns to the
>File Server (a context switch), which schedules the read, and eventually
>returns to the User Process (a context switch).
>
  Yes, that's a very flexible, elegant and ACCESSIBLE model (accessible
  in the sense that all but the microkernel is running in user mode).
  And as I've mentioned if you're on an MP system you can dispatch
  those system processes on a dedicated processor which drastically
  reduces their overhead.  Can NT dispatch its file server and
  security server on a separate processor?  What you say below implies
  "no," but I'm curious.

>NT looks like this:
>
>        {User Process}
>-----------------border between kernel and user execution rings----------
>        {File Server, MicroKernel, Security Server}
>
>The same read call will trap to the kernel ring and then execute with
>the approximate overhead of function calls between "servers".
>There are no context switches.
>
  You may cut some overhead here (and I'm not convinced it's
  incredibly significant), but you also lose the ability inherent
  in Mach to replace the file server, security server, etc., without
  mucking with kernel code.  Good OS design (the way I learned it)
  involves staying *out* of supervisor states unless you absolutely
  must be there (I may be misunderstanding your use of kernel and user
  execution rings here, and if so I apologize and retract the point :-)

>>
>>You're starting to sound like Zachman, Brian...! :-)
>
>Well, at least you put a smiley. :-)
>
  Really, pigs and dogs are very efficient and really aren't apt
  metaphors to describe slow,  clunky software.  Why not, "It's a
  sloth"?

  Not to say Mach is slow and clunky.  I think it's very elegant
  and frankly has a superior process model compared to NT's.  And
  all this talk only convinces me that you're as religious as the
  folks at CMU :-)

Andy

>C. Brian Sturgill                       *** OS/2 2.0 is for YOU! ***

  So is OS/2 for me, or not? :-)