Cloudsim Tutorials

Cloudlet in Cloudsim Simulation

Cloudlet in Cloudsim defined the workload, which is to be executed during the simulation run of the cloudsim simulation engine. Cloudlet in Cloudsim is a model class that exists inside the package ‘org.cloudbus.cloudsim‘. Cloudlet is one of the most important models which defined the specifications for a simulation engine corresponding to the real-life candidate application to be considered for moving to a Cloud-based system.

In contrast, we can also define this cloudlet as a single process or task being executed on the cloud-based system which is to be simulated through a Cloudsim simulation engine.

The cloudlet model class defines four different constructors for its initialization, its method signatures are as follows:

/*
First method signature with 8 parameters with simplest cloudlet execution with out maintaining its history or additional files
*/
public Cloudlet(
			final int cloudletId,
			final long cloudletLength,
			final int pesNumber,
			final long cloudletFileSize,
			final long cloudletOutputSize,
			final UtilizationModel utilizationModelCpu,
			final UtilizationModel utilizationModelRam,
			final UtilizationModel utilizationModelBw)

/*
Second method signature with 10 parameters with support for cloudlet execution history maintenance as well as additionl list of file requirements for execution.
*/
public Cloudlet(
			final int cloudletId,
			final long cloudletLength,
			final int pesNumber,
			final long cloudletFileSize,
			final long cloudletOutputSize,
			final UtilizationModel utilizationModelCpu,
			final UtilizationModel utilizationModelRam,
			final UtilizationModel utilizationModelBw,
			final boolean record,
			final List<String> fileList)

/*
Third method signature with 9 parameters with support for cloudlet execution additionl list of file requirements for execution.
*/
public Cloudlet(
			final int cloudletId,
			final long cloudletLength,
			final int pesNumber,
			final long cloudletFileSize,
			final long cloudletOutputSize,
			final UtilizationModel utilizationModelCpu,
			final UtilizationModel utilizationModelRam,
			final UtilizationModel utilizationModelBw,
			final List<String> fileList)

/*
Fourth method signature with 9 parameters with support for cloudlet execution history maintenance.
*/
public Cloudlet(
			final int cloudletId,
			final long cloudletLength,
			final int pesNumber,
			final long cloudletFileSize,
			final long cloudletOutputSize,
			final UtilizationModel utilizationModelCpu,
			final UtilizationModel utilizationModelRam,
			final UtilizationModel utilizationModelBw,
			final boolean record) 

Cloudlet in Cloudsim defines following are the attributes that are being by the cloudsim simulation engine:

Following are the states that each cloudlet can sustain during the simulation flow:

The cloudlets would shuffle between these states any number of times depending upon the simulation scenario under consideration.

One of the most important behaviors of the Cloudlet model class is that it may be moved from one resource to another resource due to any implicit/explicit reasons, therefore, the track is to be maintained for its movement during the simulation flow. To support this a nested class named ‘Resource’ is defined which contains the following attributes:

The instance of this ‘Resource’ model class is defined and utilized through the setResourceParameter() method of cloudlet class. Which is further utilized in the processCloudletSubmit() method(line no 715) of DataCenter class available under the same package i.e. ‘org.cloudbus.cloudsim’. This class plays a very important role in simulated distributed network applications.

Learn More

You may subscribe to an online self-paced course named Learn Basics of Cloudsim, The content for this course will be updated weekly till August 2021.

Exit mobile version