class Disk

Simulated secondary storage

Inheritance:


Public Methods

[more] Disk( ID newID = 0, string newName = "Disk", TIME newSeek = 0.0, SIZE newRPM = 0, double newBandwidth = 0.0)
Default constructor
[more]TIME getLatency(void) const
[more]TIME getSeekTime(void) const
[more]SIZE getRPM(void) const
[more]double getBandwidth(void) const
[more]TIME getTransferTime(MEMAMT dataSize = PAGESIZE)
[more]void setSeekTime(const TIME newSeek)
Sets the disk arm movement time
[more]void setRPM(const SIZE newRPM)
Sets the revolutions per minute of the disk
[more]void setBandwidth(const double newBandwidth)
Sets the number of MB per second the disk can transfer
[more]TIME calcTransferTime(MEMAMT dataSize = PAGESIZE)
Calculates the transfer time of one page from the disk
[more]void calcLatency()
Calculates the average time it takes to reach the required page on disk
[more]string toString(void) const
returns a string representation of the disk


Inherited from Resource:

Public Methods

ovirtual bool activate(const int numberOfServers = 1)
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

Simulates a hard disk. It has a latency (for r/w head) a read time and a write time.
o Disk( ID newID = 0, string newName = "Disk", TIME newSeek = 0.0, SIZE newRPM = 0, double newBandwidth = 0.0)

oTIME getLatency(void) const
Returns:
the rotational latency of the computer

oTIME getSeekTime(void) const
Returns:
arm movement time

oSIZE getRPM(void) const
Returns:
revolutions per minute of the disk

odouble getBandwidth(void) const
Returns:
MB per second bandwidth

oTIME getTransferTime(MEMAMT dataSize = PAGESIZE)
Returns:
the calculated transfer time of a page from the disk

ovoid setSeekTime(const TIME newSeek)

ovoid setRPM(const SIZE newRPM)

ovoid setBandwidth(const double newBandwidth)

oTIME 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()

ovoid calcLatency()

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