[mod.computers.68k] Minix/68k

bsteve@ucbvax.Berkeley.EDU@gorgo.UUCP (02/09/87)

The OS9 view of multitasking is very simple minded. It uses clock interrupts
to generate context switch events. Processes are totally position independent
and are referenced by a process descriptor that includes the entire hardware
context of the process (which is saved with every processor mode change). In
most implementations (with no mmu) everything runs in the same address space.
The scheduling is essentially round-robin with aging, to boost the priority
of processes that have been waiting longer. It works very well for real-time
systems since it never need worry about swapped processes (like minix, it does
not swap) and memory need only be contiguous enough to hold individual OS9
modules. The OS and *everything* under OS9 is required to be both position-
independent and re-intrant and *everyhthing* is sharable modules.

With regard to process and system contexts; the process list is made up of
a linked list of process descriptors that are walked by the scheduler. When
a clock event occurs, the current context is saved in the current context save
area for that process and the event serviced. If the clock event denotes a
context switch, the process list is walked looking for the next deserving
process and incrementing the priorities of all other processes. The old user
context priority is then returned to the base priority of that process. The
kernel then unmasks clock interrupts, restores the current process context (
which is now a different user context) and continues. This is all accomplished
very well without any mmu. It also makes the implementation of system calls
much easier (with regard to moving data between address spaces). No special
instructions are required and software traps may be used just as in the
protected mmu environment.


    Steve Blasingame (Oklahoma City)
    ihnp4!occrsh!gorgo!bsteve
    bsteve@eris.berkeley.edu