0% found this document useful (0 votes)
41 views6 pages

Dynamic Scheduling

Uploaded by

shweta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views6 pages

Dynamic Scheduling

Uploaded by

shweta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

IJCSI International Journal of Computer Science Issues, Vol.

9, Issue 6, No 2, November 2012


ISSN (Online): 1694-0814
www.IJCSI.org 397

AN ADAPTIVE ALGORITHM FOR DYNAMIC PRIORITY


BASED VIRTUAL MACHINE SCHEDULING IN CLOUD
Subramanian S1, Nitish Krishna G2, Kiran Kumar M3, Sreesh P4 and G R Karpagam5
1
Department of Computer Science and Engineering,
P.S.G College of Technology,
Coimbatore, Tamil Nadu , 641004, India
2
Department of Computer Science and Engineering,
P.S.G College of Technology,
Coimbatore, Tamil Nadu , 641004, India
3
Department of Computer Science and Engineering,
P.S.G College of Technology,
Coimbatore, Tamil Nadu , 641004, India

4
Department of Computer Science and Engineering,
P.S.G College of Technology,
Coimbatore, Tamil Nadu , 641004, India

5
Department of Computer Science and Engineering,
P.S.G College of Technology,
Coimbatore, Tamil Nadu , 641004, India

source software for building AWS-compatible private and


Abstract hybrid clouds [3]. There are several scheduling policies
Cloud computing, a relatively new technology, has been gaining already available in Eucalyptus. On analysis of these
immense popularity over the last few years. The number of cloud algorithms, each is found to have its own drawback and
users has been growing exponentially and apparently scheduling of hence a new algorithm which overcomes these
virtual machines in the cloud becomes an important issue to
disadvantages is preferable. The newly proposed algorithm
analyze. This paper throws light on the various scheduling
algorithms present for scheduling virtual machines and also is explained and its working under various circumstances
proposes a new algorithm that combines the advantages of all the has been illustrated. Also, it is compared with the other
existing algorithms and overcomes their disadvantages. existing algorithms.
Keywords: Scheduling, Eucalyptus, Dynamic priority,
Cloud.
2. EXISTING SCHEDULING ALGORITHMS
IN EUCALYPTUS
1. Introduction
Scheduling in Eucalyptus determines the method by
Cloud computing is the use of computing resources which Virtual Machines are allocated to the nodes. This is
(hardware and software) that are delivered as a service over done to balance the load on all the nodes effectively and to
a network (typically the Internet). The name comes from the achieve a target quality of service. The need for a good
use of a cloud-shaped symbol as an abstraction for the scheduling algorithm arises from the requirement for it to
complex infrastructure it contains in system diagrams. Cloud perform multitasking and multiplexing.
computing entrusts remote services with a user's data,
software and computation [1]. The scheduling of virtual The scheduling algorithm in Eucalyptus is concerned mainly
machines in a cloud computing environment has become with:
crucial due to the increase in the number of users. This is
usually done to load balance a system effectively or to Throughput - number of VMs that are successfully
achieve a target quality of service [2]. The scheduling allocated per time unit.
algorithm used contributes to the performance of the entire
system and the throughput. Eucalyptus is open

Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 6, No 2, November 2012
ISSN (Online): 1694-0814
www.IJCSI.org 398

Response time - amount of time it takes from when a this case, the scheduler does not wait for the exhaustion of
request was submitted until the first response is produced. the resources of a node before moving on to the next.
As an example, if there are three nodes and three VMs are to
Fairness / Waiting Time – All the requests for an
be scheduled, each node would be allocated one VM,
allocation of a node should be treated in the same manner
provided all the nodes have enough available resources to
without any bias.
run the VMs.
The main advantage of this algorithm is that it utilizes all the
In practice, these goals often conflict and thus a scheduler
resources in a balanced order. An equal number of VMs are
will implement a suitable compromise. Preference is given
allocated to all the nodes which ensure fairness. However,
to any one of the above mentioned concerns depending upon
the major drawback of using this algorithm is that the power
the user's needs and objectives [4] [5]. A scheduling policy
consumption will be high as many nodes will be kept turned
can be chosen by changing the value of SCHEDPOLICY in
on for a long time. If three resources can be run on a single
eucalyptus.conf file [6]. The various existing algorithms
node, all the three nodes will be turned on when Round
along with their limitations are listed below.
Robin is used which will consume a significant amount of
power.
2.1 GREEDY ALGORITHM

The Greedy algorithm is the default algorithm used for


2.3 POWER SAVE ALGORITHM
scheduling of Virtual Machines in Eucalyptus. The Greedy
algorithm is very simple and straight forward. As a matter of The Power Save algorithm optimizes the power
fact, it was the only scheduling policy which was in use for a consumption by turning off the nodes which are not
long time. Only after the cloud started evolving, more currently used. Instead of keeping all the nodes turned on,
complex scheduling policies came into effect. resulting in a lot of power consumption, this algorithm aims
The greedy algorithm uses the first node that it finds with at turning the unused nodes off which will reduce the power
suitable resources for running the VM that is to be allocated. consumed to a reasonable extent.
The first node that is identified is allocated the VM. This The scheduler allocates a VM to the node and then traverses
means that the greedy algorithm exhausts a node before it through the list of nodes to check if the node is unused and
goes on to the next node. if found to be so, turns it off. If the resource of a node which
As an example, if there are 3 nodes and the first node’s has been turned off is required for the allocation of a VM,
usage is 40% while the other two are under loaded and if the scheduler turns it on again and then allocates the VM to
there are two VMs to be allocated, then both are allocated to that node.
the first node which might result in the increase of its usage As an example, consider the scenario in which there are
to 90% while the other two nodes will still remain under three nodes, two of which are unused. When a new VM is to
loaded. be scheduled, the scheduler may allocate it to the node
As obviously seen, the main advantage of the Greedy which is already being used and would turn off the two
algorithm is its simplicity. It is both simple to implement nodes which are unused.
and also the allocation of VMs do not require any complex The Power Save algorithm results in the reduction of power
processing. The major drawback would be the low consumption but this is at the expense of lower utilization of
utilization of the available resources. As illustrated in the resources. This algorithm is used only at places where there
example above, even if there are under loaded nodes, an is an extreme need for reducing the consumption of power.
overloading of a node might result. A new scheduling algorithm has been proposed in this paper
which is based on the assignment of dynamic priority to the
2.2 ROUND ROBIN ALGORITHM nodes. It overcomes the stated limitations of the existing
scheduling algorithms and works effectively under all
circumstances.
The Round Robin algorithm mainly focuses on distributing
the load equally to all the nodes. Using this algorithm, the
scheduler allocates one VM to a node in a cyclic manner.
The round robin scheduling in the cloud is very similar to 3. PROPOSED DYNAMIC PRIORITY
the round robin scheduling used in the process scheduling. BASED SCHEDULING ALGORITHM
The scheduler starts with a node and moves on to the next
node, after a VM is assigned to that node. This is repeated The need for a new algorithm can be easily realized from the
until all the nodes have been allocated at least one VM and fact that all the existing algorithms suffer from serious
then the scheduler returns to the first node again. Hence, in drawbacks. The proposed algorithm uses dynamic priority
for the nodes based on which the virtual machines are

Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 6, No 2, November 2012
ISSN (Online): 1694-0814
www.IJCSI.org 399

scheduled. It schedules the VMs to the nodes depending priorities got changed when a request for two large instances
upon their priority value, which varies dynamically based on having high memory requirements arrived.
their load factor. This dynamic priority concept leads to
better utilization of the resources. Priority of a node is Node Priority Resource
assigned depending upon its capacity and the load factor.
available
This algorithm strikes the right balance between
performance and power efficiency. 1 1 24%
2 3 100%
3.1 PSEUDO CODE 3 4 100%
4 2 100%
Algorithm triggered when a request for a new instance Table 3.1 Initial priority value
arrives.
Input: None Node Priority Resource
Output: None available
Algorithm sched_priority
{
1 2 10%
Flag=0; 2 3 100%
If(P1 is not set) 3 4 100%
P1=max available resource node 4 1 100%
If(P1 is turned OFF) Table 3.2 Priority values after arrival of a new instance
Turn P1 ON
If(load factor of P1<0.8) 3.2 TRACING ALGORITHM WITH VARIOUS
Assign VM to P1; SCENARIOS
Flag=1;
if(P2 is set AND load factor of P2<0.8 AND
When a request to schedule a Virtual Machine is received, it
Flag=0)
checks if the maximum resource node has been identified
Swap P1 and P2;
and its priority has been assigned. If the node has not been
Assign VM to P1;
identified, then it is identified first. The node with the
Else if(Flag=0)
maximum resource is determined and then it is checked
P2=P1
whether the node has a load factor less than 80%. This is
P1=current max available resource node
done to prevent a particular node from being overloaded.
Once the suitable node is identified, then it is assigned the
If(P1 is turned OFF)
highest priority and the VM is allocated to it as shown in Fig
Turn P1 ON
3.2.
Assign VM to P1;
Turn OFF all unused nodes;
}

Fig 3.2 VM allocated to the highest priority node

Fig 3.1 Priority based dynamic scheduling algorithm If the highest priority has a load factor above 80%, then it
checks if the next maximum resource node has been
As and when the virtual machines are assigned to the nodes, identified. If it has been identified and if its load factor is
recalculation of their priorities takes place. Table 3.1 shows less than 80%, then the VM is scheduled to that node and
the statistics of the available resources along with priorities the search for the next maximum resource node with the
when 4 nodes were used. Table 3.2 explains how these load factor less than 80% takes place. Before assigning the

Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 6, No 2, November 2012
ISSN (Online): 1694-0814
www.IJCSI.org 400

new node as the highest priority node, the current maximum to these nodes directly and the other nodes are not taken into
resource node is assigned to previous maximum resource consideration.
node and the previous maximum resource node is assigned
the next highest priority.

Fig 3.3 Highest priority node has a load factor of 75% Fig 3.5 Idle node is shut down

The purpose of keeping track of the previous maximum When it comes to power efficiency, every time the request
resource node is to prevent the fluctuations above and below for scheduling is received, it also checks for the idle nodes.
the load factor in extreme cases, when VMs are assigned to The idle nodes are one to which, no VM is allocated to it.
it and removed from it. Consider the scenario in which, the These nodes are turned off to save power as shown in Fig
maximum resource node has been identified and it has been 3.5.
assigned the highest priority. The VMs are allocated to it till
the load factor is less than 80%. Assume that the current 3.3 HIGHLIGHTS OF THE ALGORITHM
load factor is 75% as shown in Fig 3.3. After allocating a
VM to it, the load factor becomes 85% as shown in Fig 3.4. 1. Once the highest and next highest priority nodes have
On completion of the work, the VM is shut down and the been identified, then the scheduling is very quick.
load factor goes to 75%. The load factor fluctuates above
2. It prevents a particular node from being overloaded by
and below 80% frequently and will initiate a new search
request for finding the new node. To overcome this problem, considering the load factor.
the previous maximum resource node is kept track off i.e. 3. The idle nodes are turned off. Hence it is power
the next highest priority node. efficient.
4. It prevents fluctuations around the load factor of 80% in
most cases. Fluctuation occurs only under extreme
cases, when all the nodes have load factor which are
approximately 80%.

4. COMPARISON OF ALGORITHMS

On comparison with the other algorithms, the proposed


Fig 3.4 Highest priority node is changed dynamic priority based scheduling algorithm has been found
to work more effectively in most of the cases.
If the highest priority node has the load factor more than
80%, then it keeps allocating the VMs to the next highest
priority node until its load factor becomes greater than 80%.
4.1 COMPARISON WITH GREEDY ALGORITHM
This gives the highest priority node some time to finish off
the work of VM and shut it down so that it would be well
The proposed algorithm does not exhaust a particular node
below the load factor. If the load factor is still above 80%,
like Greedy algorithm. Therefore the proposed algorithm
then its priority is decreased and the other node is assigned
makes better utilization of the available resources.
higher priority.
This algorithm shows remarkable speed in terms of the time
taken to schedule a Virtual Machine to a node, once these
nodes have been identified. The scheduling would be done

Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 6, No 2, November 2012
ISSN (Online): 1694-0814
www.IJCSI.org 401

Fig 4.1 Comparison with greedy algorithm


Fig 4.3 Comparison with power save algorithm

As shown in Fig. 4.1, the resource utilization of the As shown in Fig.4.3, even though the difference is not very
proposed algorithm is better than that of the greedy vast, the response time of the proposed algorithm is lesser
algorithm, given that the number of nodes is fixed. than that of power save algorithm as the number of virtual
machines increase, keeping the number of nodes fixed.
4.2 COMPARISON WITH ROUND ROBIN
ALGORITHM 5. CONCLUSION
The proposed algorithm takes a constant time to assign a
node once the priorities have been assigned, unlike the Thus a new algorithm for the scheduling of virtual machines
Round Robin algorithm and the proposed algorithm also in Eucalyptus platform was proposed along with the
consumes lesser power than the round robin algorithm.
explanation of how the algorithm would work under various
circumstances. A comparative study was done comparing
the various existing algorithms with the proposed algorithm
and the results were illustrated in the form of graphs.
However, the proposed algorithm does not handle certain
cases like the failure of nodes. Also, the uptime and
downtime of nodes have not been measured.

This scheduling algorithm can be extended to suit other


cloud platforms also. Here, the load factor above which the
highest priority node changes is kept constant. Further
extension to this algorithm can be done by varying the
Fig 4.2 Comparison with round robin algorithm maximum load factor, above which the priority of a node
decreases, dynamically by setting it to an optimum value
As shown in Fig. 4.2, keeping the number of nodes fixed, based on the present conditions.
the power consumption in the proposed algorithm is lesser
than that of round robin algorithm until the number of
virtual machines increases such that all the nodes are turned Acknowledgments
on. From that point onwards, both the algorithm consume
the same power until any one of the nodes gets turned off We would like to thank Cordys for introducing the concept
according to the proposed algorithm. of cloud computing to us and inspiring us to take up issues
in cloud computing as our research project.
4.3 COMPARISON WITH POWER SAVE
ALGORITHM References
[1] Cloud Computing:
http://en.wikipedia.org/wiki/Cloud_computing
The proposed algorithm does not turn off the nodes very
[2] Scheduling:
frequently unlike the power save algorithm and hence faster
response times are seen than that of power save algorithm. http://en.wikipedia.org/wiki/Scheduling_(computing)

Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 6, No 2, November 2012
ISSN (Online): 1694-0814
www.IJCSI.org 402

[3] Eucalyptus:
http://en.wikipedia.org/wiki/Eucalyptus_(computing)
[4] Brief discussion of Job Scheduling algorithms-
http://www.cs.sunysb.edu/~algorith/files/scheduling.shtml
[5] Blazewicz, J., Ecker, K.H., Pesch, E., Schmidt, G. und J.
Weglarz, Scheduling Computer and Manufacturing Processes,
Berlin (Springer) 2001
[6] Eucalyptus Scheduling Algorithms:
http://open.eucalyptus.com/

Subramanian S is currently the B.E. degree candidate


In Department of Computer Science, P.S.G College of Technology,
Coimbatore, India. His research interests include
Cloud computing and its applications.

Nitish Krishna G is currently the B.E. degree candidate


In Department of Computer Science, P.S.G College of Technology,
Coimbatore, India. His research interests include
Cloud computing and its applications.

Kiran Kumar M is currently the B.E. degree candidate


In Department of Computer Science, P.S.G College of Technology,
Coimbatore, India. His research interests include
Cloud computing and its applications.

Sreesh P is currently the B.E. degree candidate


In Department of Computer Science, P.S.G College of Technology,
Coimbatore, India. His research interests include
Cloud computing and its applications.

G R Karpagam is a professor at the Department of Computer


Science, P.S.G College of Technology, Coimbatore, India. Her
specialization areas include database, service oriented architecture
and cloud computing.

Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.

You might also like