class GangSched

a gang scheduler

Inheritance:


Public Methods

[more] GangSched()
Default constructor
[more]virtual ~GangSched()
Destructor
[more]virtual void setComputers(map<ID, Computer>* computers)
Gives the scheduler access to the system's computers
[more]virtual bool submitProcess(const Token& token)
Informs the scheduler a process has been submitted
[more]virtual bool startProcess(const Token& token)
Informs the scheduler a process has started.
[more]virtual bool terminateProcess(const Token& token)
Informs the scheduler a process has terminated
[more]virtual bool timeQuantumExpired()
Informs the scheduler that the time quantum for this time slice has expired.
[more]virtual bool schedule(bool start = true)
Implements the gang scheduling algorithm
[more]virtual Policy getPolicy() const
[more]SIZE getCurrMPL(void) const
[more]SIZE getHighestMPL(void) const
[more]double getAverageMPL(void) const
[more]unsigned long getTotalPCS(void) const
[more]void setQuantumLength(const TIME time)
Sets the length of each time quantum
[more]void setMaxMPL(const SIZE newMPL)
Sets the largest number of time slices that may be used
[more]void setPCSTime(const TIME newTime)
[more]list<ID> getCurrentlyRunning()
[more]bool isCurrentlyRunning(Process* process)
[more]virtual void setMemoryAware(const bool value)
Sets whether the scheduler will concern itself with memory constraints or not.

Public Members

[more] End Scheduling Interface ///////////////////////////


Inherited from Scheduler:

Public Methods

ovoid setNetwork(Network* newNetwork)
ovoid setQueuedEvents(QueuedEvents* newEvents)
ovoid setProcessList(map <ID, Process*>* newList)
ovoid setPacking(const Packing newPacking)
ovoid setPriority(const Priority newPriority)
ovoid setSchedulingOverhead(const TIME overhead)
obool getMemoryAware() const
ostatic Policy stringToPolicy(string str)
ostatic Priority stringToPriority(string str)
ostatic Packing stringToPacking(string str)
ostatic string policyToString(Policy pol)
ostatic string priorityToString(Priority pri)
ostatic string packingToString(Packing pack)
ovirtual 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
o GangSched()

ovirtual ~GangSched()

ovirtual void setComputers(map<ID, Computer>* computers)

ovirtual 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.

ovirtual bool startProcess(const Token& token)
The gang scheduler has nothing special to do a process start time

ovirtual 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.

ovirtual 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.

ovirtual bool schedule(bool start = true)

ovirtual Policy getPolicy() const
Returns:
gang.

o End Scheduling Interface ///////////////////////////
End Scheduling Interface /

oSIZE getCurrMPL(void) const
Returns:
the current number of time slices used.

oSIZE getHighestMPL(void) const

odouble getAverageMPL(void) const

ounsigned long getTotalPCS(void) const

ovoid setQuantumLength(const TIME time)

ovoid setMaxMPL(const SIZE newMPL)

ovoid setPCSTime(const TIME newTime)

olist<ID> getCurrentlyRunning()
Returns:
a list of processes running in the current time slice

obool isCurrentlyRunning(Process* process)

ovirtual 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++.