GreenCloud Simulator
|
#include <vm.h>
Public Member Functions | |
VM () | |
virtual | ~VM () |
virtual void | print () |
virtual void | printTasklist () |
virtual int | command (int argc, const char *const *argv) |
virtual void | updateMIPS () |
virtual void | addResource (DcResource *res) |
vm_state | getVmState () |
void | setHost (ResourceProvider *newHost) |
Public Member Functions inherited from ResourceProvider | |
ResourceProvider () | |
virtual | ~ResourceProvider () |
void | setTskComSink (TskComSink *tcs) |
int | tryToAllocate (ResourceConsumer *rc) |
bool | releaseAllocation (ResourceConsumer *rc) |
bool | addVM (VM *newVm) |
bool | removeVM (VM *vm) |
ResourceProvider * | getHost () |
DcHost * | getRootHost () |
void | recv (ResourceConsumer *rcobj) |
double | getResTypeUtil (res_type type) |
double | getTotalCap (res_type type) |
int | testSchedulingPossibility (CloudTask *tskobj) |
int | trySchedulingTsk (CloudTask *tskobj) |
void | sendTaskOutput (CloudTask *task) |
void | scheduleNextExent (double nextDeadline) |
TskComAgent * | getTskComAgent () |
Public Member Functions inherited from ResourceConsumer | |
ResourceConsumer () | |
ResourceConsumer (unsigned int size, std::vector< Resource * > dem, bool isTask, bool isVM) | |
virtual | ~ResourceConsumer () |
unsigned int | getSize () |
void | setSize (unsigned int size) |
void | setCurrentPerformance (std::vector< double > newPerf) |
void | addUsedCapacity (double *cap) |
Protected Member Functions | |
virtual void | updateEnergyAndConsumption () |
Protected Member Functions inherited from ResourceProvider | |
virtual void | handle (Event *event) |
void | updateEvent () |
void | nextEvent (double delay) |
double | getCurrentLoad () |
double | updateResTypeUtil (res_type type) |
double | getFreeCap (res_type type) |
double | getFreeCapRecursive (res_type type) |
double | getUsedNet (bool in, bool out) |
double | getUsedNetRecursive (bool in, bool out) |
void | setTskComAgent (TskComAgent *agnt) |
void | setAgent (ProviderOutAgent *agent) |
TcpAgent * | getAgent () |
void | attachSink (VmMigrationSink *vm_mig_sink) |
void | attachSource (ProviderOutAgent *tcp_agent) |
void | detachSink (VmMigrationSink *vm_mig_sink) |
void | detachSource (ProviderOutAgent *tcp_agent) |
Protected Attributes | |
vm_state | state |
Protected Attributes inherited from ResourceProvider | |
double | resource_utilization [LastResType+1] |
std::vector< ResourceConsumer * > | hosted_vms_ |
std::vector< VmMigrationSink * > | vm_migration_sinks_ |
std::vector< ProviderOutAgent * > | vm_migration_sources_ |
TskComSink * | tskComSink_ |
ProviderOutAgent * | poagent_ |
ResourceProvider * | host |
bool | started_ |
int | status_ |
Event | event_ |
Additional Inherited Members | |
Public Types inherited from ResourceProvider | |
enum | EventStatus |
Public Attributes inherited from ResourceProvider | |
std::vector< std::vector< DcResource * > > | resource_list |
int | id_ |
int | ntasks_ |
double | currentLoad_ |
double | currentLoadMem_ |
double | currentLoadStor_ |
double | currentLoadNet_ |
int | eDVFS_enabled_ |
int | tskFailed_ |
TskComAgent * | tskComAgent |
Public Attributes inherited from ResourceConsumer | |
bool | isTask |
bool | isVM |
double | size_ |
double | currProcRate_ |
std::vector< ResDemand * > | res_demands |
Static Public Attributes inherited from ResourceProvider | |
static double | uplink_overhead =ResourceProvider::MTU/ResourceProvider::useful_bytes |
static double | MTU =1500.0 |
static double | useful_bytes =1460.0 |
|
virtual |
Reimplemented from ResourceProvider.
Definition at line 49 of file vm.cc.
|
virtual |
Reimplemented from ResourceProvider.
Definition at line 56 of file vm.cc.
vm_state VM::getVmState | ( | ) |
|
virtual |
Implements ResourceProvider.
Definition at line 90 of file vm.cc.
|
virtual |
void VM::setHost | ( | ResourceProvider * | newHost | ) |
|
protectedvirtual |
Implements ResourceProvider.
Definition at line 81 of file vm.cc.