Simulated CPUs
Inheritance:
Public Methods
-
CPU(ID newID = 0, string newName = "CPU", double clock = 1000)
- Default constructor
-
void addCPU(void)
- Adds another CPU to this group
-
unsigned long getNumCPUs(void) const
-
-
double getSpeed(void) const
- get the clock speed of the CPU (in MHz)
-
void setSpeed(const double speed)
- Sets the CPU clock speed (in Mhz)
-
bool activate(void)
- Turn on the CPUs
-
string toString(void) const
- Returns a string representation of the CPU
Public Methods
-
FacStatus request(const Token& tkn)
-
bool release(const int tkn_id)
-
bool clear(const int tkn_id)
-
bool isServicing(const int tkn_id) const
-
TIME getInUseTime(void) const
Inherited from SimObj:
Public Methods
-
string getName(void) const
-
ID getID(void) const
-
void setName(const string newName)
-
void setID(const ID newID)
Documentation
This class simulates CPUs. One CPU object can contain one
or more CPUs.
CPU(ID newID = 0, string newName = "CPU", double clock = 1000)
-
void addCPU(void)
-
unsigned long getNumCPUs(void) const
-
A simulated CPU object can actually contain many CPUs. This
simulates 'one queue multiple servers'
double getSpeed(void) const
-
void setSpeed(const double speed)
-
bool activate(void)
-
string toString(void) const
-
- 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++.