A single thread of execution
Inheritance:
Public Methods
-
Thread( Computer* newComputer, Process* newParent, TIME newMemAccessRate, TIME localSynchRate, TIME globalSynchRate, const string newName="Thread", const ID newID=0)
- Default constructor
-
~Thread()
- Destructor
-
MEMAMT allocateSafeLocalMemory(MEMAMT allocated = 0.0)
-
-
bool allocateMemory()
-
-
void deallocateMemory()
-
-
ProcessEvent getNextEvent()
- Returns the next event this thread will generate
-
ID getNextCommunication()
-
-
TIME getCPUReqTime(void)
-
-
bool getNextAccess(void)
- Gets the next page of memory this thread will access
-
TIME nextCPUReqOk(void)
- a signal to the thread object
-
void pageIn(void)
- Simulates bringing in one page of data into main memory
-
void finishGlobalSynch()
-
-
void overallocation(MEMAMT netRAM, MEMAMT disk)
-
-
void suspend()
-
-
bool isEventLengthSet(void) const
-
-
TIME initEventInfo(TIME totalTime, ProcessEvent event)
- Initializes event information (e.g. elapsed time is set to 0)
-
void resetEventInfo(void)
-
-
void updateEventInfo(void)
- Updates event information
-
void recalculateEvent(void)
- signals the thread that no more work should be done and the current event should be repeated
-
void restart(void)
- restarts the current event
-
void quickRestart(void)
-
-
void useCPUTime(TIME amount)
- Subtracts the amount passed from the CPU time remaining
-
void addNeighbor(ID computer)
-
-
Process* getParent(void) const
-
-
ProcessEvent getEvent(void) const
-
-
TIME getEventStart(void) const
-
-
TIME getEventTime(void) const
-
-
TIME getEventElapsed(void) const
-
-
TIME getEventRemaining(void) const
-
-
ID getNextCommId(void) const
-
-
TIME getCPUTimeLeft(void) const
-
-
unsigned long getTotalPageFaults(void) const
-
-
Computer* getHost(void)
-
-
TIME getSuspendedTime(void) const
-
-
void setParent(Process* newProcess)
- Sets the process this thread belongs to
-
void setEventTime(const TIME amount)
- Sets the amount of time this event will take to execute
-
void setMemoryAccessRate(const TIME amount)
- Sets how often a memory access will occur.
-
void setPNRClient(PNRClient* client)
-
Inherited from SimObj:
Public Methods
-
string getName(void) const
-
ID getID(void) const
-
void setName(const string newName)
-
void setID(const ID newID)
-
virtual void clear(void)
-
virtual string toString(void) const
-
virtual bool activate(void)
Documentation
A component of a process (or job).
Thread( Computer* newComputer, Process* newParent, TIME newMemAccessRate, TIME localSynchRate, TIME globalSynchRate, const string newName="Thread", const ID newID=0)
-
~Thread()
-
MEMAMT allocateSafeLocalMemory(MEMAMT allocated = 0.0)
-
bool allocateMemory()
-
void deallocateMemory()
-
ProcessEvent getNextEvent()
-
A side effect of this function is that the event
after the event being returned may be generated
ID getNextCommunication()
-
TIME getCPUReqTime(void)
-
bool getNextAccess(void)
-
This algorithm was lifted from one of Feitelson's papers.
TIME nextCPUReqOk(void)
-
This signal states that the CPU may be requested for any length of
time and no page faults will result.
void pageIn(void)
-
Note that the data could be coming from disk or network RAM - the thread
doesn't really care.
void finishGlobalSynch()
-
void overallocation(MEMAMT netRAM, MEMAMT disk)
-
void suspend()
-
bool isEventLengthSet(void) const
-
- Returns:
- whether the length of the current event has been calculated
or not.
TIME initEventInfo(TIME totalTime, ProcessEvent event)
-
void resetEventInfo(void)
-
void updateEventInfo(void)
-
Updates elapsed time and remaining time (among others)
based on current time and when the event was last updated.
void recalculateEvent(void)
-
void restart(void)
-
void quickRestart(void)
-
void useCPUTime(TIME amount)
-
void addNeighbor(ID computer)
-
Process* getParent(void) const
-
- Returns:
- the parent process
ProcessEvent getEvent(void) const
-
- Returns:
- the currently executing (or suspended) event
TIME getEventStart(void) const
-
Start time is really the last update time. Start time could
either be the real start time, or it could be when updateEventInfo()
was last called.
- Returns:
- when the event was "started"
TIME getEventTime(void) const
-
- Returns:
- the total amount of (service) time the event will take
TIME getEventElapsed(void) const
-
- Returns:
- the amount of (service) time the event has gotten so far
TIME getEventRemaining(void) const
-
- Returns:
- the amount of (service) time the event must still receive
in order to complete
ID getNextCommId(void) const
-
- Returns:
- the next computer we will communicate with
TIME getCPUTimeLeft(void) const
-
- Returns:
- the amount of CPU time that must still be completed before
this thread will finish
unsigned long getTotalPageFaults(void) const
-
Computer* getHost(void)
-
TIME getSuspendedTime(void) const
-
void setParent(Process* newProcess)
-
void setEventTime(const TIME amount)
-
void setMemoryAccessRate(const TIME amount)
-
void setPNRClient(PNRClient* client)
-
- 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++.