The Pedigree Project  0.1
Public Member Functions | List of all members
SchedulingAlgorithm Class Referenceabstract

#include <SchedulingAlgorithm.h>

+ Inheritance diagram for SchedulingAlgorithm:
+ Collaboration diagram for SchedulingAlgorithm:

Public Member Functions

virtual ~SchedulingAlgorithm ()
 
virtual void addThread (Thread *pThread)=0
 
virtual void removeThread (Thread *pThread)=0
 
virtual ThreadgetNext (Thread *pCurrentThread)=0
 
virtual void threadStatusChanged (Thread *pThread)=0
 

Detailed Description

Class providing an abstraction of a long term scheduling algorithm.

Definition at line 31 of file SchedulingAlgorithm.h.

Constructor & Destructor Documentation

SchedulingAlgorithm::~SchedulingAlgorithm ( )
virtualdefault

Destructor

Member Function Documentation

virtual void SchedulingAlgorithm::addThread ( Thread pThread)
pure virtual

Adds a new thread to be scheduled.

Implemented in RoundRobin.

Referenced by PerProcessorScheduler::addThread(), and PerProcessorScheduler::initialise().

+ Here is the caller graph for this function:

virtual Thread* SchedulingAlgorithm::getNext ( Thread pCurrentThread)
pure virtual

Return the next thread that should be scheduled for the given Processor.

Parameters
pProcessorThe Processor for which the scheduling should take place - this is provided for heuristic purposes (core affinity etc).
Note
It is assumed that this function will set the Thread's TTL and other such values itself.

Implemented in RoundRobin.

Referenced by PerProcessorScheduler::killCurrentThread(), and PerProcessorScheduler::schedule().

+ Here is the caller graph for this function:

virtual void SchedulingAlgorithm::removeThread ( Thread pThread)
pure virtual

Removes a thread - this thread should no longer be scheduled.

Implemented in RoundRobin.

Referenced by PerProcessorScheduler::killCurrentThread().

+ Here is the caller graph for this function:

virtual void SchedulingAlgorithm::threadStatusChanged ( Thread pThread)
pure virtual

Notifies us that the status of a thread has changed, and that we may need to take action.

Implemented in RoundRobin.

Referenced by PerProcessorScheduler::timer().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: