class CPU

Simulated CPUs

Inheritance:


Public Methods

[more] CPU(ID newID = 0, string newName = "CPU", double clock = 1000)
Default constructor
[more]void addCPU(void)
Adds another CPU to this group
[more]unsigned long getNumCPUs(void) const
[more]double getSpeed(void) const
get the clock speed of the CPU (in MHz)
[more]void setSpeed(const double speed)
Sets the CPU clock speed (in Mhz)
[more]bool activate(void)
Turn on the CPUs
[more]string toString(void) const
Returns a string representation of the CPU


Inherited from Resource:

Public Methods

oFacStatus request(const Token& tkn)
obool release(const int tkn_id)
obool clear(const int tkn_id)
obool isServicing(const int tkn_id) const
oTIME getInUseTime(void) const


Inherited from SimObj:

Public Methods

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


Documentation

This class simulates CPUs. One CPU object can contain one or more CPUs.
o CPU(ID newID = 0, string newName = "CPU", double clock = 1000)

ovoid addCPU(void)

ounsigned long getNumCPUs(void) const
A simulated CPU object can actually contain many CPUs. This simulates 'one queue multiple servers'

odouble getSpeed(void) const

ovoid setSpeed(const double speed)

obool activate(void)

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