a gang scheduler
Inheritance:
Public Methods
-
GangSched()
- Default constructor
-
virtual ~GangSched()
- Destructor
-
virtual void setComputers(map<ID, Computer>* computers)
- Gives the scheduler access to the system's computers
-
virtual bool submitProcess(const Token& token)
- Informs the scheduler a process has been submitted
-
virtual bool startProcess(const Token& token)
- Informs the scheduler a process has started.
-
virtual bool terminateProcess(const Token& token)
- Informs the scheduler a process has terminated
-
virtual bool timeQuantumExpired()
- Informs the scheduler that the time quantum for this time slice has expired.
-
virtual bool schedule(bool start = true)
- Implements the gang scheduling algorithm
-
virtual Policy getPolicy() const
-
-
SIZE getCurrMPL(void) const
-
-
SIZE getHighestMPL(void) const
-
-
double getAverageMPL(void) const
-
-
unsigned long getTotalPCS(void) const
-
-
void setQuantumLength(const TIME time)
- Sets the length of each time quantum
-
void setMaxMPL(const SIZE newMPL)
- Sets the largest number of time slices that may be used
-
void setPCSTime(const TIME newTime)
-
-
list<ID> getCurrentlyRunning()
-
-
bool isCurrentlyRunning(Process* process)
-
-
virtual void setMemoryAware(const bool value)
- Sets whether the scheduler will concern itself with memory constraints or not.
Public Members
-
End Scheduling Interface ///////////////////////////
Public Methods
-
void setNetwork(Network* newNetwork)
-
void setQueuedEvents(QueuedEvents* newEvents)
-
void setProcessList(map <ID, Process*>* newList)
-
void setPacking(const Packing newPacking)
-
void setPriority(const Priority newPriority)
-
void setSchedulingOverhead(const TIME overhead)
-
bool getMemoryAware() const
-
static Policy stringToPolicy(string str)
-
static Priority stringToPriority(string str)
-
static Packing stringToPacking(string str)
-
static string policyToString(Policy pol)
-
static string priorityToString(Priority pri)
-
static string packingToString(Packing pack)
-
virtual string toString() const
Documentation
This object implements a gang scheduler. The scheduler is responsible for
keeping track of what processes are running in which time quantums and ensures
that they are properly started and stopped at the beginning and end of each
quantum.
The gang scheduler can be configured in many ways. For instance, it can take
memory considerations into account, or not. The MPL can be set to any number
and to infinity, etc.
Also available are slot unification and alternative scheduling
GangSched()
-
virtual ~GangSched()
-
virtual void setComputers(map<ID, Computer>* computers)
-
virtual bool submitProcess(const Token& token)
-
The gang scheduler attempts to find a time slice the process can
fit into. If none is found, then it attempts to create a new one - subject
to MPL and (if desired) memory considerations.
virtual bool startProcess(const Token& token)
-
The gang scheduler has nothing special to do a process start time
virtual bool terminateProcess(const Token& token)
-
If jobs are waiting, and can fit in the empty space in the time slice,
they are scheduled to run. Also, slot unification is attempted at job
termination.
virtual bool timeQuantumExpired()
-
At this event, the scheduler do a parallel context switch. This entails
suspending all running processes in the current time slice and resuming all
processes that are scheduled to run in the next time slice.
At this point alternative scheduling is attempted.
virtual bool schedule(bool start = true)
-
virtual Policy getPolicy() const
-
- Returns:
- gang.
End Scheduling Interface ///////////////////////////
- End Scheduling Interface /
SIZE getCurrMPL(void) const
-
- Returns:
- the current number of time slices used.
SIZE getHighestMPL(void) const
-
double getAverageMPL(void) const
-
unsigned long getTotalPCS(void) const
-
void setQuantumLength(const TIME time)
-
void setMaxMPL(const SIZE newMPL)
-
void setPCSTime(const TIME newTime)
-
list<ID> getCurrentlyRunning()
-
- Returns:
- a list of processes running in the current time slice
bool isCurrentlyRunning(Process* process)
-
virtual void setMemoryAware(const bool value)
-
- This class has no child classes.
- Author:
- John Oleszkiewicz
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.