Dynamic Scheduling
Dynamic Scheduling
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
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
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.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
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
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.
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/
Copyright (c) 2012 International Journal of Computer Science Issues. All Rights Reserved.