-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtualmachine.h
28 lines (24 loc) · 973 Bytes
/
virtualmachine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// Created by bhavesh on 1/4/16.
//
#ifndef ENERGYAWAREDC_VIRTUALMACHINE_H
#define ENERGYAWAREDC_VIRTUALMACHINE_H
typedef unsigned int Id;
typedef float Rate; // Unit of rates is per second. Converted to float for ease of calculation of utilization
typedef unsigned long long Byte;
class VirtualMachine
{
public:
Id virtualMachineId;
Id hostId;
Rate lambda[96]; // The workload characterized as a series of lambdas, each for 15 minutes
Rate mu;
float utilization;
// Byte totalMemory; // Commented. Assuming VM has enough memory i.e. over-committed memory
Byte memoryConsumed;
Byte requestMemorySize; // Indicates the amount of memory allocated for processing the request
// Byte requestQueueSize; // Commented. Because of totalRequestCount. The size of the request queue of this VM
int totalRequestCount; // Represents the total number of requests in the system
bool isMigrating;
};
#endif //ENERGYAWAREDC_VIRTUALMACHINE_H