14 #include "copyright.h" The following class defines the scheduler/dispatcher abstraction – the data structures and operation...
Definition: scheduler.h:22
bool RemoveThreadFromReadyList(Thread *threadToRemove)
Scheduler::RemoveThreadFromReadyList Remove a specific thread from the ready list.
Definition: scheduler.cc:160
void ReadyToRun(Thread *thread)
Scheduler::ReadyToRun Mark a thread as ready, but not running. Put it on the ready list...
Definition: scheduler.cc:55
Scheduler()
Scheduler::Scheduler Initialize the list of ready but not running threads to empty.
Definition: scheduler.cc:31
~Scheduler()
Scheduler::~Scheduler De-allocate the list of ready threads.
Definition: scheduler.cc:41
void Run(Thread *nextThread)
Scheduler::Run Dispatch the CPU to nextThread. Save the state of the old thread, and load the state o...
Definition: scheduler.cc:92
The following class defines a "thread control block" – which represents a single thread of execution...
Definition: thread.h:79
Data structures for managing threads.
Routines to manage a singly-linked list of "things". Defining TRUE and FALSE is usually a Bad Idea...
void Print()
Scheduler::Print Print the scheduler state – in other words, the contents of the ready list...
Definition: scheduler.cc:151
Thread * FindNextToRun()
Scheduler::FindNextToRun Return the next thread to be scheduled onto the CPU. If there are no ready t...
Definition: scheduler.cc:72