tac0S
Template Affectional Command Operating System
|
Routines to choose the next thread to run, and to dispatch to that thread. More...
Routines to choose the next thread to run, and to dispatch to that thread.
These routines assume that interrupts are already disabled. If interrupts are disabled, we can assume mutual exclusion (since we are on a uniprocessor). NOTE: We can't use Locks to provide mutual exclusion here, since if we needed to wait for a lock, and the lock was busy, we would end up calling FindNextToRun(), and that would put us in an infinite loop. Very simple implementation -- no priorities, straight FIFO. Might need to be improved in later assignments.
Copyright (c) 1992-1993 The Regents of the University of California. All rights reserved. See copyright.h for copyright notice and limitation of liability and disclaimer of warranty provisions.