class System

A simulated computer system

Inheritance:


Public Methods

[more] System(const ID newID = 0, const string newName = "Simulated System")
Default constructor
[more] ~System()
Destructor
[more]bool activate(void)
Activates the components of the simulator
[more]bool simulate(void)
Starts the simulation
[more]void extractTokenInfo(const Token& token, ID& tokenID, Thread*& thread, Process*& process, ID& computer, Computer*& computerPtr)
[more]bool addComputer(Computer newComputer)
Adds a computer to the system
[more]void replaceScheduler(Scheduler* newScheduler)
Replaces the system's scheduler with the one provided
[more]bool connectComputers(const network_topology topology, const double bandwidth, const TIME latency, const TIME switchdelay)
Builds a network to connect the computers already in the system.
[more]bool setProcessList(vector<Process*>* list)
Sets the systems process list to the one passed
[more]void setMemAccessRate(const TIME rate)
Sets the default amount of time each process spends accessing virtual memory
[more]void setCommRate(const TIME rate)
Sets the default amount of time each (parallel) process spends communicating.
[more]void setSynchRate(const TIME rate)
[more]void setMaxSimTime(const TIME time)
[more]ID getNextComputer()
Returns the ID of the next computer able to accept more jobs
[more]double getMemAccessRate(void) const
Gets the default percentage of time each parallel process spends accessing virtual memory.
[more]double getCommRate(void) const
Gets the default percentage of time each (parallel) process spends communicating.
[more]string toString(void) const
returns a string representation of the entire system
[more]string toComputerString(void) const
[more]string toProcessString(void) const
[more]void calcMetrics(void)
Gathers interesting information from processes, resources, etc. and calculates metrics based on them.
[more]void clearMetrics(void)
Resets metrics variables so that they may be recalculated
[more]void calcAllocationMetrics(void)
[more]string toMetricsString(void)
Converts the calculated metrics to a string suitable for printing to cout
[more]string toMetricsLine(void)
Converts calculated metrics to a single-line string suitable for printing to a log file
[more]void setUpdateOutput(OutputObject* out)
set the output object for simulator progress updates
[more]void setMetricsOutput(OutputObject* out)
set the output object for simulator metrics updates
[more]void setMetricsCollectionPeriod(TIME period)
Set the amount of time between metrics collections


Inherited from SimObj:

Public Methods

ostring getName(void) const
oID getID(void) const
ovoid setName(const string newName)
ovoid setID(const ID newID)
ovirtual void clear(void)


Documentation

The system class encapsulates all of the computers and their interconnecting network. It also stores all processes that will run on the system.
o System(const ID newID = 0, const string newName = "Simulated System")

o ~System()

obool activate(void)

obool simulate(void)

ovoid extractTokenInfo(const Token& token, ID& tokenID, Thread*& thread, Process*& process, ID& computer, Computer*& computerPtr)

obool addComputer(Computer newComputer)

ovoid replaceScheduler(Scheduler* newScheduler)

obool connectComputers(const network_topology topology, const double bandwidth, const TIME latency, const TIME switchdelay)

obool setProcessList(vector<Process*>* list)

ovoid setMemAccessRate(const TIME rate)

ovoid setCommRate(const TIME rate)

ovoid setSynchRate(const TIME rate)

ovoid setMaxSimTime(const TIME time)

oID getNextComputer()

odouble getMemAccessRate(void) const

odouble getCommRate(void) const

ostring toString(void) const
The representation will consist of every computer, every network component, and every process in the system. So look out - the output can be VERY large!
Returns:
a string representation of the system.

ostring toComputerString(void) const
Returns:
string info on computers in system

ostring toProcessString(void) const
Returns:
string info on processes in system

ovoid calcMetrics(void)

ovoid clearMetrics(void)

ovoid calcAllocationMetrics(void)

ostring toMetricsString(void)

ostring toMetricsLine(void)

ovoid setUpdateOutput(OutputObject* out)

ovoid setMetricsOutput(OutputObject* out)

ovoid setMetricsCollectionPeriod(TIME period)


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