noss  

nos-supervisor (or nos simulator)  

noss is a previledge program. A previledge program is a program that is "out-of-bound" of user programs.  A previledge program provides mechanism for executing a user program, for example,  Sx-sim is a previledge program that "execute" s-code.  In our implementation, previledge programs are written in C.  User programs are written in Nut.

nos is a user program.  noss controls sx-sim.  noss drives sx-sim to execute instructions for a "quanta".  A quanta is a time period counted as clock cycles.  sx-sim executes one instruction and returns to noss.  The number of cycle used is accumulated.  When this number exceeds "quanta", noss takes action by calling "switchp" in nos.

"switchp" saves the current computation state.  The computation state is ip, sp, fp of the current process.  They are saved to the process control block.  The next process in the process queue is then activated.  Its computation state is then "loaded" into sx-sim. At this point, the user program (the current process) resumes its execution and continues until noss interrupts it.
"switchp" is a previledge process, it is allowed to run to completion without interruption.

The situation above describes a time-out situation where a process has used up its own time allocation.  Othe kind of interrupts are, when the process is blocked, and when the process is terminated.

noss is minimal in the sense that it does not do a lot of things by itself.  The only thing it does is to call "switchp".  "switchp" is in user space. noss monitors the state of computation of a process through global variables: status and activep.

how to compile "run"?

13 August 2006
