# Sharing with Live Migration Energy Optimization Scheduler for Cloud Computing Data Centers
## 4 SLM Scheduler Algorithm
``` Create different types of task Submit task to broker for execution For each task from task queue For each VM from VM list Submit task to the VM If VM.host.utilization > 80 Migrate VMs until host utilization is <80 Else If VM.host.utilization < 30 Migrate to another host and hibernate current host If the read/download counter=0 & write/upload lock is in off mode for the current task required resource file Submit task for execution If the task type is read/download  Increment the read/download counter Else Set write/upload lock on Else If read/download counter \(\
eq\)0  If task type is read/download  Submit task for execution, increment counter Else Submit task to waiting queue Else Submit task to the waiting queue After execution of task If task has used file for read or download  Decrement read/download count Else Set write/upload off

## 5 SLM Simulation and Analysis

In the proposed approach of the SLM, we used the Cloud-Sim toolkit to simulate the total energy consumption. Then, we compared the SLM simulation results with the data center design in [28]. ### Assumptions

The cloud data center proposes six physical servers, each with 10 virtual machines, and there are several characteristics for all of the VMs and hosts, where each had the exact same specific characteristics, such as processing capability, storage, and bandwidth. Each host has eight GB of RAM, 2 TB of storage, four CPUs that have a capacity power of 10,000 MIPS, and the data center is 16 DVS-enabled processors [29]. Each host has three different source files required by the cloud users, and since the data center has six hosts, we applied the replica method on half of the hosts, which means that three hosts have nine different sources, while the other half of the hosts have the exact copy of the nine files, as shown in Figure 1.

### Simulation Environment

We used Cloud-Sim as the simulation platform, as it enables modeling and simulating the cloud computing systems, provides a wide range of application environments, and supports both the system and behavior modeling of cloud systems, such as data centers, virtual machines, and resource provisioning policies [29]. The aim of the simulation is to evaluate the efficiency of the algorithm in a typical data center scenario. In order to simulate the datacenter, six hosts and 60 VMs were included, as well as 500 tasks requiring four different types of processing (reading, downloading, writing, or uploading), and nine source files located in hosts to be processed by the different tasks. ### Simulation Scenario

A broker entity connects users to the cloud. First, the user submits a task to its broker; then, the broker schedules the tasks based on a scheduling policy. Before scheduling the task, the broker dynamically gets a list of available resources and information regarding the hosts where they are located. The simulated scenario includes the generation of 500 tasks, which are passed to a scheduler to control and prioritize their admission. The simulation environment had been set up and executed following the next steps in the scenario:

1. Generating tasks: Set up task types to reading, writing, uploading, and downloading with task lengths of 10,000, 40,000, 80,000, and 200,000. Generate a random number of tasks and set their configuration (type, size, number). Figure 1: Identical hosts. Primary admission control: Data center broker submits tasks to a class called 'cloudlet' to manage transferring it to the proper VM without violating any concurrency control rule while there are enough free processing elements (PEs). * Application-specific analysis and ranking: The file execution details describe each task, such as file VM number, file host number, file number, and task type. The SLM scheduling policy assign tasks directly to the first under-loaded VM that has the corresponding required file. The 'cloudlet' type represents the type of the task process, which could be either reading, downloading, writing, or uploading, each bearing a corresponding code.