An object that maintains time slice information for gang schedulers
Public Methods
-
TimeSlices()
- default constructor
-
~TimeSlices()
- Destructor
-
void setTemplateSlice(map<ID, Computer>* computers)
- Sets up template slice, from which all new slices will be copied
-
bool insert(const Token& token, const Packing packing = FIRSTFIT)
- Inserts a process into a time slice
-
bool remove(const Token& token)
- Removes a process from a time slice
-
set<Process*> slotUnification()
- Attempts to unify two slots with disjoint computer allocations
-
void nextSlice(void)
- Advances internal iterator which moves us to the next time slice
-
void prevSlice(SliceItr& itr)
- Moves the provided slice iterator backwards
-
void setMaxMPL(const SIZE newMPL)
- Sets the maximum number of time slices that may be used
-
void setMemoryAware(const bool value)
- Sets whether the slicer should care about memory constraints or not
-
SIZE getNumSlices(void) const
- Gets the number of slices currently in use
-
SIZE getMaxMPL(void) const
- Returns the maximum number of slices that may be used
-
SIZE getCurrentMPL(void) const
- Gets the current number of slices that are being used
-
SIZE getBiggestMPL(void) const
- Gets the largest number of slices that have been used
-
double getAverageMPL(void) const
- Gets the average number of slices that have been used
-
void checkMPL(void)
- To calculate average MPL.
-
bool isInCurrentSlice(Process* process)
- Checks if the given process is executing in the current time slice
-
list<ID> getCurrentlyRunning(void)
- Returns the process IDs of processes running in the current time slice.
Documentation
An object that maintains time slice information for gang schedulers
TimeSlices()
-
~TimeSlices()
-
void setTemplateSlice(map<ID, Computer>* computers)
-
bool insert(const Token& token, const Packing packing = FIRSTFIT)
-
Depending on availability and the packing scheme, this might involve
putting the process in an existing slice or creating a new slice to
accomodate it.
bool remove(const Token& token)
-
A side effect of this event may be the removal of the time slice
set<Process*> slotUnification()
-
If unification is not possible, it still runs some of the processes
in the current time slice if possible - which is alternate scheduling
void nextSlice(void)
-
void prevSlice(SliceItr& itr)
-
void setMaxMPL(const SIZE newMPL)
-
0 signifies an infinite number of slices may be used.
void setMemoryAware(const bool value)
-
If the slicer cares, then it will not allocate computers to
processes that would push them over their allocation thresholds.
SIZE getNumSlices(void) const
-
This is equivalent to the current MPL
SIZE getMaxMPL(void) const
-
0 translates to an infinite number
SIZE getCurrentMPL(void) const
-
SIZE getBiggestMPL(void) const
-
double getAverageMPL(void) const
-
void checkMPL(void)
-
bool isInCurrentSlice(Process* process)
-
list<ID> getCurrentlyRunning(void)
-
- 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++.