class TimeSlices

An object that maintains time slice information for gang schedulers

Public Methods

[more] TimeSlices()
default constructor
[more] ~TimeSlices()
Destructor
[more]void setTemplateSlice(map<ID, Computer>* computers)
Sets up template slice, from which all new slices will be copied
[more]bool insert(const Token& token, const Packing packing = FIRSTFIT)
Inserts a process into a time slice
[more]bool remove(const Token& token)
Removes a process from a time slice
[more]set<Process*> slotUnification()
Attempts to unify two slots with disjoint computer allocations
[more]void nextSlice(void)
Advances internal iterator which moves us to the next time slice
[more]void prevSlice(SliceItr& itr)
Moves the provided slice iterator backwards
[more]void setMaxMPL(const SIZE newMPL)
Sets the maximum number of time slices that may be used
[more]void setMemoryAware(const bool value)
Sets whether the slicer should care about memory constraints or not
[more]SIZE getNumSlices(void) const
Gets the number of slices currently in use
[more]SIZE getMaxMPL(void) const
Returns the maximum number of slices that may be used
[more]SIZE getCurrentMPL(void) const
Gets the current number of slices that are being used
[more]SIZE getBiggestMPL(void) const
Gets the largest number of slices that have been used
[more]double getAverageMPL(void) const
Gets the average number of slices that have been used
[more]void checkMPL(void)
To calculate average MPL.
[more]bool isInCurrentSlice(Process* process)
Checks if the given process is executing in the current time slice
[more]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
o TimeSlices()

o ~TimeSlices()

ovoid setTemplateSlice(map<ID, Computer>* computers)

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

obool remove(const Token& token)
A side effect of this event may be the removal of the time slice

oset<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

ovoid nextSlice(void)

ovoid prevSlice(SliceItr& itr)

ovoid setMaxMPL(const SIZE newMPL)
0 signifies an infinite number of slices may be used.

ovoid setMemoryAware(const bool value)
If the slicer cares, then it will not allocate computers to processes that would push them over their allocation thresholds.

oSIZE getNumSlices(void) const
This is equivalent to the current MPL

oSIZE getMaxMPL(void) const
0 translates to an infinite number

oSIZE getCurrentMPL(void) const

oSIZE getBiggestMPL(void) const

odouble getAverageMPL(void) const

ovoid checkMPL(void)

obool isInCurrentSlice(Process* process)

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