coroutines, objects, etc] of the software, and the communication techniques
by which internal information flows among them. [Internal information
refers to program control variables and context dependent information, as
opposed to external information which is data being processed by the
program.] It is the internal information flows that bind the program units
together and impart to the system its structure.
In considering system structure, we must also consider the structure of the
individual software units. These units should be constructed according to the
tenets of structured programming and object oriented programming which
have become well known since the late 1960s. That is, each module should
be single entry single exit, entry at the physical beginning exit at the
physical end, restricted use of global variables, etc.
The kernel described here is structured as a hierarchy of software levels.
Each level of the hierarchy defines a new machine by effecting an
abstraction of the next lower level machine. A hierarchical structure results
because of the communication techniques within levels and between
adjacent levels. It is not too soon to note that it is a violation of design
principle that communication would skip a level. So the above compound
phrase within levels and between adjacent levels is precise
The Five Levels
Level-0 is the hardware machine. The purpose of the higher levels is to
abstract from this machine to one that more readily lends itself to building
the next higher level, and eventually to interfacing to user programs. The
master design criterion for the lower levels is efficient access to the
hardware. It will become the responsibility of the higher levels to provide
ready interfacing to utility and user programs.
Level-1 software is usually referred to as interrupt handlers or interrupt
service routines [ISRs]. This software recognizes interrupts and effects
transfers of information between elements of the level-0 machine, usually
between I/O devices and memory. This is a precise description of this level;
no other processes should be executed here. In particular, as a general
principle, software at this level should not make decisions, but rather should
only execute predetermined processes.
Level-2 software initializes variables in the level-1 machine to prepare the
latter to process information transfers in response to interrupts. Specifically,