Signals and context switches

Richard M. Mathews richard at locus.com
Thu Jun 20 10:06:06 AEST 1991


This discussion of optimizing context switches reminds me of a problem
encountered in IX/370.  IX/370 (little or no relation to AIX/370) was
an ancient attempt to put Unix on a 370 by having Unix running under
SSS, which in turn may be running on VM.  By the time something like
an interrupt could percolate through all these operating systems, WWIII
could come and go.

Some hacks were put into SSS and IX/370 to get them to work together to
improve performance.  For example, after a fork(), SSS apparently would
be told to immediately run the child.  After an exit(), SSS apparently
would be told to immediately run the parent.  This sped up a benchmark
in which a parent repeatedly does fork()/wait() and each child immediately
exits.  The problem was that nothing else would run.  Simultaneously start
up such a benchmark such that it runs forever and start up a compile of
a standard "hello world" program.  I actually left a machine in such a
state overnight, and the tiny compile never finished.

Moral: be careful about making broad assumptions about optimizations for
your scheduler.

Disclaimer: Opinions are my own, not LCC's or IBM's.  Facts are likely
to be distorted by a brain that long ago turned into tapioca pudding.

Richard M. Mathews			D efend
richard at locus.com			 E stonian-Latvian-Lithuanian
lcc!richard at seas.ucla.edu		  I ndependence
...!{uunet|ucla-se|turnkey}!lcc!richard



More information about the Comp.unix.wizards mailing list