Information Technology Reference
In-Depth Information
reaches a local optimum quickly. Thus, each particle makes a move from their asso-
ciated host to one of its neighbors, which has the minimum load among all. If all its
neighbors are busier than the associated host itself, the particle is not moved from the
current host. Finally, the particle delivers its associated VM to the host with the lower
load among their neighbors and finishes its task.
Algorithm 2. PSO-based Cloud scheduler: Core logic
Procedure
PSOallocationPolicy (vm, hostList )
Begin
particle
= new
Particle (vm,
hostList )
particle . getInitialHost ()
currentPositionLoad
initialHostId
=
=
particle . calculateTotalLoad ( initialHostId )
neighbours
=
particle . getNeighbours ( initialHostId ,
neighbourSize )
While
(i
<
neighbours . size () )
do
neighbourId
neighbours . get (i)
destPositionLoad
=
particle . calculateTotalLoad ( neighbourId )
if ( destPositionLoad
=
==
0)
currentPositionLoad
=
destPositionLoad
neighbours . get (i)
i = neighbours . size ()
end i f
if ( currentPositionLoad destPositionLoad > velocity )
velocity = currentPositionLoad destPositionLoad
currentPositionLoad = destPositionLoad
destHostId = neighbours . get (i)
end
destHostId
=
i f
i = i + 1
end while
allocatedHost = hostList . get ( destHostId )
if (! allocatedHost. allocateVM(vm)
PSOallocationPolicy (vm, hostList )
End
Since each move a particle performs involves traveling through the intra-datacenter
network, similarly to ACO, a control to minimize the number of moves that a particle
performs have been added: every time a particle moves from the associated host to a
neighbor host that has not allocated VMs yet, the particle allocates its associated VM to
it immediately. The smaller the number messages sent to the hosts through the network
by a particle, the smaller the impact of the latency in the response time given to the user.
4.3
Scheduler at the VM Level
Once the VMs have been allocated to physical resources at the Infrastructure level, the
job scheduler proceeds to assign the jobs to these VMs. This sub-algorithm uses two
lists, one containing the jobs that have been sent by the user, i.e., a PSE, and the other
list contains all user VMs that are already allocated to a physical resource and hence
are ready to execute jobs. The algorithm iterates the list of all jobs, and then retrieves
jobs by a FIFO policy. Each time a job is obtained from the list, it is submitted to be
executed in a VM in a round robin fashion. Internally, the algorithm maintains a queue
for each VM that contains its list of jobs to be executed. The procedure is repeated until
all jobs have been submitted for execution. Due to their high CPU requirements, and the
Search WWH ::




Custom Search