CloudSim is a popular publicly-accessible model which is deployed significantly for simulating the cloud computing frameworks. The composition of the project manuscript on cloud simulator will adhere to the specific regulations set forth by your esteemed university with good simulation results. Should you require further assistance, please do not hesitate to reach out to us. It is worth noting that we have established partnerships with over 200 renowned SCI and SCOPUS indexed journals, ensuring a seamless publication process. As reflecting on power management, cloudlet scheduling and VM allocation, we propose an outline of crucial techniques which are applicable in CloudSim:
- VM Allocation Policies
- SimpleVMAllocationPolicy
- Explanation: SimpleVMAllocation efficiently assigns VMs to the first accessible hosts with adequate resources, as it is a fundamental VM allocation policy.
- Applicable Areas: For basic conditions like where resource allocation and capability are not key issues, this policy is highly adaptable.
- Algorithm:
Public class SimpleVMAllocationPolicy extends VmAllocationPolicy {
Public Boolean allocateHostForVm (Vm vm) {
For (Host host : getHostList()) {
If (host.isSuitableForVm (vm)) {
Return host.vmCreate (vm);
}
}
Return false;
}
}
- FirstFitVMAllocationPolicy
- Explanation: To enable the VM, it assigns VMs to the first host which contains sufficient sources.
- Applicable Areas: Considering the environments, where there is a necessity of easiness and speed of allocation, it might be beneficial.
- Algorithm:
Public class FirstFitVMAllocationPolicy extends VmAllocationPolicy {
Public Boolean allocateHostForVm (Vm vm) {
For (Host host : getHostList()) {
If (host.isSuitableForVm (vm)) {
Return host.vmCreate (vm);
}
}
Return false;
}
}
- BestFitVMAllocationPolicy
- Explanation: For the purpose of facilitating the VM, it is still capable, as VMs are assigned to the hosts which consist of a minimum percentage of accessible resources.
- Applicable Areas: This policy intends to improve resource allocation and reduce resource segmentation.
- Algorithm:
Public class BestFitVMAllocationPolicy extends VmAllocationPolicy {
Public Boolean allocateHostForVm (Vm vm) {
Host best Host = null;
Double minResources = Double.MAX_VALUE;
For (Host host : getHostList()) {
Double available Resources = host.getAvailableMips ();
If (host.isSuitableForVm (vm) && available Resources < minResources) {
Best Host = host;
MinResources = available Resources;
}
}
If (best Host! = null) {
Return bestHost.vmCreate (vm);
}
Return false;
}
}
- Cloudlet Scheduling Policies
- Time-Shared Scheduling
- Explanation: In terms of time-sharing framework in which each cloudlet acquires a time slice for implementation, these Cloudlets distribute the CPU resources.
- Applicable Areas: If the reactivity is a crucial component in some cases, it could be appropriate for interactive applications.
- Algorithm:
Public class CloudletSchedulerTimeShared extends CloudletScheduler {
Public double updateVmProcessing (double currentTime, List<Double> mipsShare) {
Double timeAllocated = currentTime – getPreviousTime ();
For (ResCloudlet rcl : getCloudletExecList()) { rcl.updateCloudletFinishedSoFar ((long) (timeAllocated * rcl.getAllocatedMips ()));
}
- Space-Shared Scheduling
- Explanation: Before moving forward to the subsequent level, this scheduling assigns the complete CPU to a single cloudlet until it accomplishes its implementation process.
- Applicable Areas: Than reactivity, where throughput is more significant, it can be applicable for batch processing applications.
- Algorithm:
Public class CloudletSchedulerSpaceShared extends CloudletScheduler {
Public double updateVmProcessing (double currentTime, List<Double> mipsShare) {
Double timeAllocated = currentTime – getPreviousTime ();
For (ResCloudlet rcl : getCloudletExecList()) {
rcl.updateCloudletFinishedSoFar ((long) (timeAllocated * rcl.getAllocatedMips()));
If (rcl.isCloudletFinished ()) {
GetCloudletFinishedList ().add (rcl);
GetCloudletExecList ().remove (rcl);
}
}
SetPreviousTime (currentTime);
Return timeAllocated;
}
}
- Dynamic VM Provisioning and Migration Policies
- Dynamic VM Allocation
- Explanation: According to the existing requirements, this dynamic VM allocation effectively modifies the number of VMs. If it is required, it implements innovative VMs or eliminates inactive VMs.
- Applicable Areas: Especially for platforms with varying load densities, this allocation is highly adaptable as well as it assures cost affordability and resource allocation.
- Algorithm:
Public class DynamicVmAllocationPolicy extends VmAllocationPolicy {
Public Boolean allocateHostForVm (Vm vm) {
// Logic to dynamically allocate VMs based on current demand
}
Public void deallocateIdleVms () {
// Logic to deallocate VMs that are no longer needed
}
}
- VM Migration
- Explanation: To enhance load balancing, resource allocation and decrease energy usage, VM migration algorithm relocates VMs from one host to another.
- Applicable Areas: For preserving the SLAs, energy efficiency and load balancing, this technique is broadly applicable.
- Algorithm:
Public class VmMigrationPolicy {
Public List<MigrationPlan> getMigrationPlan (List<Host> hostList) {
List<MigrationPlan> migrationPlans = new ArrayList<> ();
For (Host host : hostList) {
If (host.isOverUtilized ()) {
Vm vmToMigrate = selectVmForMigration (host);
Host target Host = findTargetHost(vmToMigrate, hostList);
If (target Host! = null) {
migrationPlans.add (new MigrationPlan(vmToMigrate, target Host));
}
}
}
Return migrationPlans;
}
Public Vm selectVmForMigration (Host host) {
// Logic to select VM for migration
}
Public Host findTargetHost t(Vm vm, List<Host> hostList) {
// Logic to find target host for VM migration
}
}
- Energy-Aware Policies
- Power-Aware VM Allocation
- Explanation: As preserving the performance, it reduced energy usage by assigning VMs to hosts in a dynamic manner.
- Applicable Areas: The data centers which emphasizes on reduction of functional expenses and green computing, this Power-Aware VM Allocation is highly adaptable.
- Algorithm:
Public class PowerAwareVmAllocationPolicy extends VmAllocationPolicy {
Public boolean allocateHostForVm (Vm vm) {
Host bestHost = null;
Double minPower = Double.MAX_VALUE;
For (Host host : getHostList()) {
Double power = host.getPowerModel (). getPower (host.getUtilizationOfCpu());
if (host.isSuitableForVm(vm) && power < minPower) {
BestHost = host;
MinPower = power;
}
}
If (bestHost! = null) {
Return bestHost.vmCreate (vm);
}
Return false;
}
}
- Network-Aware Policies
- Network-Aware VM Allocation
- Explanation: Network-Aware VM Allocation enhances the throughput and reduces network response time through assigning VMs which examines the network topology and bandwidth necessities.
- Applicable Areas: Regarding the data transfer demands and high network reliability applications, this technique is very essential.
- Algorithm:
Public class NetworkAwareVmAllocationPolicy extends VmAllocationPolicy {
Public Boolean allocateHostForVm (Vm vm) {
// Logic to allocate VMs based on network topology and bandwidth
}
}
What parameters of the cloud system can be simulated by CloudSim?
In cloud computing, there are several parameters involved for conducting the simulation process. Some of the significant parameters are provided by us that are efficiently simulated by CloudSim:
- Data Center Configuration
- Number of Data Centers: It specifies the number of datacenters which are required for simulation.
- Features:
- Architecture: Model like x86 is defined here.
- Operating System (OS): Describe the OS (Operating System) such as Linux.
- Virtual Machine Monitor (VMM): Hypervisors such as XVM and Xen are efficiently defined.
- Cost Models:
- Cost per Second: Specifies the cost per second for utilizing the data center resources.
- Cost per Memory: Cost of memory consumption is determined by this model.
- Cost per Storage: This model depicts the cost of storage consumption.
- Cost per Bandwidth: It indicates the cost of bandwidth consumption.
- Host Configuration
- Number of Hosts: In each data center, it depicts the amount of hosts involved.
- Features:
- CPU Capacity (MIPS): This parameter computes the power in MIPS (Million Instructions per Second).
- RAM (MB): It exhibits the accessible amount of RAM.
- Storage (GB): Storage capacity.
- Bandwidth (bps): Network bandwidth.
- Power Model: For energy-aware simulations, this parameter incorporates power consumption models.
- Scheduling Policies: CPU allocation policies are included such as Time-Shared, Space-Shared.
- Virtual Machine (VM) Configuration
- Number of VMs: The number of virtual machines for the development process is indicated.
- Features:
- VM ID: For each VM, it provides a specific identity.
- Image Size (GB): Disk image size.
- RAM (MB): Assigned amount of RAM is defined.
- CPU Capacity (MIPS): The assigned CPU capacity is illustrated.
- Bandwidth (bps): For each VM, this parameter comprises network bandwidth.
- Number of CPUs: It defines the amount of CPU cores.
- VMM: Establish the hypervisor such as KVM and Xen.
- Scheduling Policies: This involves VM allocation policies such as Space-shared and Time-Shared.
- Cloudlet (Task) Configuration
- Number of Cloudlets: It indicates the number of cloudlets (tasks) which could be implemented.
- Features:
- Cloudlet ID: Especially for each cloudlet, it includes a specific identity.
- Length: In the cloudlet, the amount of instructions is clearly exhibited.
- File Size (MB): Size of the input file is represented.
- Output Size (MB): Determines the size of the output file.
- Number of CPUs: The required amount of CPU cores is depicted here.
- Utilization Model: This parameter encompasses resource allocation frameworks such as UtilizationModelStochastic and UtilizationModelFull.
- Network Configuration
- Network Topology: For the data center, describe the network topology.
- Network Bandwidth: Among various network components, it develops the bandwidth.
- Response Time: Within data centers, hosts and VMs, simulate the network response time.
- Energy Usage
- Power Models: Regarding the hosts and data centers, simulate the energy usage.
- Energy-Aware Policies: Energy-efficient techniques should be executed and assessed.
- Scheduling and Resource Allocation
- VM Allocation Policies: For assigning the VMs to hosts, specify the strategies.
- Cloudlet Scheduling Policies: On VMs, determine policies for programming cloudlets.
- Dynamic VM Provisioning: Depending on requirements, simulate auto-provisioning and de-provisioning of VMs.
- Cost Models
- Cost Estimation: To utilize cloud resources, simulate various pricing frameworks and estimate the costs.
- Billing: In terms of resource allocation, execute billing technologies.
- Quality of Service (QoS)
- QoS Metrics: QoS parameters have to be simulated and evaluated like accessibility, latency and throughput.
- SLA Enforcement: SLAs (Service Level Agreements) should be executed and assessed.
- Security and Privacy
- Security Policies: On cloud performance, simulate the implications of diverse security tactics.
- Data Encryption: The impacts of data encryption and security protocols must be formulated.
- Fault Tolerance
- Failure Models: Software and hardware breakdowns should be simulated.
- Recovery Technologies: It is required to execute and assess recovery techniques and defect tolerance methods.
- User Behavior
- Workload Models: Diverse load densities and behavior models must be simulated.
- Client Requests: To simulate practical consumption, design and formulate client demands.
Sample Configuration in CloudSim
// create a data center
Datacenter = createDatacenter (“Datacenter_1”);
// create a broker
Datacenter Broker broker = new DatacenterBroker (“Broker”);
// Create VMs and Cloudlets
List<Vm> vmList = new ArrayList<>();
List<Cloudlet> cloudletList = new ArrayList<>();
// VM configuration
Int vmId = 0;
Int MIPS = 1000;
Long size = 10000; // Image size (GB)
Int ram = 512; // RAM (MB)
Long BW = 1000; // Bandwidth (bps)
Int vcpus = 1; // Number of CPU cores
String vmm = “Xen”; // VMM
Vm vm = new Vm (vmId, broker.getId (), mips, vcpus, ram, bw, size, vmm, new CloudletSchedulerTimeShared ());
vmList.add (vm);
// Cloudlet configuration
Int cloudletId = 0;
Long length = 400000; // Cloudlet length
Long fileSize = 300; // File size (MB)
Long outputSize = 300; // Output size (MB)
UtilizationModel utilizationModel = new UtilizationModelFull ();
Cloudlet cloudlet = new Cloudlet(cloudletId, length, vcpus, fileSize, outputSize, utilizationModel, utilizationModel, utilizationModel);
cloudlet.setUserId (broker.getId ());
cloudlet.setVmId (vmId);
cloudletList.add (cloudlet);
// submit VM and Cloudlet lists to the broker
broker.submitVmList (vmList);
broker.submitCloudletList (cloudletList);
// Start the simulation
CloudSim.startSimulation ();
List<Cloudlet> newList = broker.getCloudletReceivedList ();
CloudSim.stopSimulation ();
// Print results
printCloudletList (newList);