Simulated secondary storage
Inheritance:
Public Methods
-
Disk( ID newID = 0, string newName = "Disk", TIME newSeek = 0.0, SIZE newRPM = 0, double newBandwidth = 0.0)
- Default constructor
-
TIME getLatency(void) const
-
-
TIME getSeekTime(void) const
-
-
SIZE getRPM(void) const
-
-
double getBandwidth(void) const
-
-
TIME getTransferTime(MEMAMT dataSize = PAGESIZE)
-
-
void setSeekTime(const TIME newSeek)
- Sets the disk arm movement time
-
void setRPM(const SIZE newRPM)
- Sets the revolutions per minute of the disk
-
void setBandwidth(const double newBandwidth)
- Sets the number of MB per second the disk can transfer
-
TIME calcTransferTime(MEMAMT dataSize = PAGESIZE)
- Calculates the transfer time of one page from the disk
-
void calcLatency()
- Calculates the average time it takes to reach the required page on disk
-
string toString(void) const
- returns a string representation of the disk
Public Methods
-
virtual bool activate(const int numberOfServers = 1)
-
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
Simulates a hard disk. It has a latency (for r/w head)
a read time and a write time.
Disk( ID newID = 0, string newName = "Disk", TIME newSeek = 0.0, SIZE newRPM = 0, double newBandwidth = 0.0)
-
TIME getLatency(void) const
-
- Returns:
- the rotational latency of the computer
TIME getSeekTime(void) const
-
- Returns:
- arm movement time
SIZE getRPM(void) const
-
- Returns:
- revolutions per minute of the disk
double getBandwidth(void) const
-
- Returns:
- MB per second bandwidth
TIME getTransferTime(MEMAMT dataSize = PAGESIZE)
-
- Returns:
- the calculated transfer time of a page from the disk
void setSeekTime(const TIME newSeek)
-
void setRPM(const SIZE newRPM)
-
void setBandwidth(const double newBandwidth)
-
TIME calcTransferTime(MEMAMT dataSize = PAGESIZE)
-
Nothing is returned from this function, but an internal
transfer time variable is set. Access to this variable is via
getTransferTime()
void calcLatency()
-
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++.