next up previous
Next: Process Resumption and Up: Xinu Mechanism for Previous: ctxsw

The Null Process

The code in resched, when deciding on a new process to execute, does not bother to verify if the ready list is empty. It assumes that one process is always available to catch interrupts. Xinu ensures that a ready process always exists, by creating an extra process, called the null process, when it initializes the system. This process has process id 0, its code consists of an infinite loop, and it has priority zero (why?). It is important to always have at least one ready process (whose stack can be used) to handle interrupts.



Prasun Dewan
Tue Jan 20 11:58:31 EST 2004