tac0S
Template Affectional Command Operating System
scheduler.cc File Reference

Routines to choose the next thread to run, and to dispatch to that thread. More...

#include "copyright.h"
#include "scheduler.h"
#include "system.h"

Detailed Description

Routines to choose the next thread to run, and to dispatch to that thread.

Author
Olivier Hureau, Hugo Feydel , Julien ALaimo
 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.