Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

2017 2nd International Conference for Convergence in Technology (I2CT)

Prioritized job scheduling algorithm using


parallelization technique in cloud computing
Mallika Mhatre, Pragya Shree, Dr. Sanjay Kumar Sharma
Department of Computer Science
Banasthali University
Rajasthan, India
mallikamhatre1994@gmail.com, prags.shree@gmail.com, ssanjay@banasthali.in

Abstract— Cloud computing is a distributed and parallel 3. Software as a service (SAAS): In this model the
computing model in which cloud service providers guarantees to service provider stores the software on its own end and from
provide services to client by pay-per-use model. Now-a-days, it is there it gives users the facility to use that software as service
possible to share pool of virtualized computer resources, without installing the software to the user’s system. Example:
computational equipments, servers and storages in cloud
Email services.
computing environment. Allocating resources to highly
prioritized job within estimated time is one of the biggest issues Increasing growth of cloud computing and virtualization
in job scheduling. Job should be scheduled properly in order to technologies reflects increasing numbers of jobs that require
provide higher throughput of the system and to maintain Quality the services of the virtual machines, hence arises the problem
of Service & Economic Principles of Management policies. To of scheduling, as cloud service providers have to serve many
solve such scheduling problem, we have proposed prioritized job user requested jobs in cloud computing environment.
scheduling algorithm with parallelization technique. This Scheduling is the task allocation process to available resources
algorithm mainly focuses on equally prioritized job problem and that aims to maximize resources utilization and to save energy
uses master-slave concept for job scheduling. We had compared consumption of resources without affecting quality of service.
and analyzed our algorithm with other priority based algorithm.
In this paper, we have proposed job scheduling algorithm for
Results shows that proposed algorithm improves performance
and resource utilization of cloud and it reduces execution time prioritized job scheduling problem.
period by balancing load across cloud.
II. LITERATURE REVIEW
Keywords—cloud computing; job scheduling; priority; In [1], authors have discussed different job scheduling
parallelization. algorithm in cloud computing environment and summarizes
some methods to improve the performance. They said that as
I. INTRODUCTION
cloud computing is in the infancy state, a scheduling
Cloud computing is widely accepted for their high framework should be implemented for fulfilling user demands
performance computing that aims to power the next and requirements as well as service providers. The different
generation data centers as the platform for dynamic and scheduling metrics are coupled to prepare a framework for
flexible application provisioning. With recent advancement in resource allocation and also for scheduling in cloud
cloud computing, applications and IT infrastructure are computing. The input limitations for scheduling framework
provided as services to clients by pay-per-use model. It is the suggested by authors are: deadline, performance issue,
combination of distributed and parallel computing that focuses execution cost, energy efficiency, makespan, transmission
to provide high quality and low-cost information services cost and load balancing as well. In [2], different scheduling
where cloud service providers offers guarantee to provide algorithms are discussed and compared using scheduling
services using large scale cloud environment. Cloud parameters like response time, complexity, etc. and by all
computing provides various service models: these comparison authors had reached into this conclusion that
1. Infrastructure as a service (IAAS): This model is there is no method to handle an urgent request any faster than
supposed to provide user the services like hardware other requests in queue. So author says that there is a need to
component and storage by using virtualization techniques. propose a new scheme which achieves all the objectives and
Example: Google drive. as well as provide better performance and can handle urgent
2. Platform as a service (PAAS): This model is request as priority. Authors had suggested that in future work
supposed to provide user the services like automatic scaling, by exploring existing algorithms and merge them with Genetic
load balancing and integration with other services and also Algorithm which is a bio inspired artificial intelligence
provide the platform to develop, run and compile codes of the scheme and may achieve the best performance.
developer of the cloud application. So for this model the cloud Authors have proposed algorithm based on priority and
application developers are one of the major users. Example: round robin [3] such that, tasks are grouped into two groups
Cloud 9. Deadline based and cost based, in second step deadline based

978-1-5090-4307-1/17/$31.00 ©2017 IEEE 576


tasks are arranged in ascending order and cost based are of parallel processing. This algorithm provides better
arranged in descending order of task length. Then in third step utilization of resources. In [10], authors reviewed and
queue is subdivided into 3 queue i.e. HIGH, MID, LOW. Task compared different priority based job scheduling techniques.
from HIGH and MID queue are executed in round robin Double level priority based optimization algorithm [11]
fashion and Task from LOW queue are executed in FCFS improves cost and completion time of job. Incoming tasks are
order. In [4], authors have proposed an optimized version of grouped and prioritized on the basis of data and requested
FCFS Algorithm which allocates resources to next task in resources by the task. Resource selection for task is done on
parts or simply put request in wait and looks for next request. the basis of cost and turnaround time of task. In [12], authors
Here, tasks are grouped according to minimum execution time have surveyed various types of parallel scheduling algorithms
or cost and prioritized, and resources are allocated based on and reached to a conclusion that all the existing parallel
deadline and cost constraints. If request is deadline constraint scheduling algorithms does not consider the node utilization
then it is serviced immediately and if request is cost constraint and response time of a parallel workload in the cloud. Authors
then the request providing more cost efficiency is allocated say that the Buddy Allocation Mechanism gives best
first. This algorithm maximizes resource utilization and performance among all existing methods. As in Buddy
improves throughput. allocation mechanism the computing capacity of data center
In [5], authors have proposed improved max-min node is partitioned into K- tiers. In this mechanism the
algorithm based on expected execution time instead of background jobs does not affect the foreground job. In
completion time as selection basis for tasks, applicable to foreground virtual machine and background virtual machine
small scale distributed system, minimizes waiting time of simultaneously execute in parallel to improve the resource
short jobs (minimum execution time) by allocating to fastest utilization and minimize the communication cost. This is how
resources (resource having maximum completion time) to it’s overcome from the drawback of CMCBF, AMCBF and
finish large number of tasks during largest task (task having other algorithms. Table 1 shows the summary of scheduling
maximum execution time) executing on slower resource metrics considered by existing algorithms.
(minimum completion time) that reduces overall makespan of
the system and balances load across resources, here makespan TABLE I. SUMMARY OF SCHEDULING METRICS USED IN EXISTING
ALGORITHMS
totally depends on how many small tasks are executing
concurrently with large task. In future work this algorithm can Algorithms Scheduling Metrics
be improved by using one of the heuristics algorithms as
Resource Utilization, Response
genetic algorithm and genetic programming. In [6], authors Optimized FCFS
Time
have proposed enhanced max-min algorithm, it is the unique Execution time, Makespan, Load
modification to [5]. In improved max-min scheduling Improved Max-min
Balancing
technique, in case largest task is too large compared to task in Execution time, Response time,
Enhanced Max-min
meta-task then overall makespan increases and load imbalance Makespan, Load Balancing
across resources takes place, because there is major difference Makespan, Reasonable
Priority Based
processing speed or bandwidth of slowest and fastest resource. Complexity, Consistency
This algorithm assigns task with average execution time Priority Based for
Execution Time, Resource
(average or greater than average task) to resource produces Heterogeneous cloud
Utilization, Consistency
Environment
minimum completion time (slower resource). This reduces
overall makespan and balance load across resources. Priority Based Dynamic
Resource Utilization
allocation
In [7], authors have proposed priority based job scheduling
algorithm based on multiple criteria decision making model Double Priority Based Cost, Completion Time
has reasonable complexity. Improving algorithm to reduce
makespan is a future work of this paper. In [8], authors have III. METHODOLOGY OF PROPOSED SYSTEM
proposed priority scheduling algorithm for cloud computing Fig 1 shows the architecture of proposed system. In the
which is based on factors that governs the functioning of a proposed system, master processor will accept the jobs, then
job. In this priority based algorithm jobs are classified into assigns priority on the basis of cost and deadline. These
high, medium and low based on priority parameter. Priority is prioritized jobs are distributed among k slave node in round
assigned as high computational complexity of jobs and high robin manner. Slave node will execute the jobs on first come
level of parallelism of resources is given as high priority. This first serve basis. This method is used for SAAS only.
method completes job with high efficiency, less execution
time is required with the use of less number of resources and A. Master Node
shows consistency during execution of assigned task. Master processor is very powerful processor in terms of
In [9], priority based dynamic resource allocation speed, level of interface to slave processor etc. Task manager
technique for preemptable jobs have been proposed. In this of Master processor maintains 3 queues for job scheduling.
method, dynamic resource allocation is done by considering 1) Buffer queue (BQ[i]): Task manager stores new job in
the Service Level Agreements (SLA) (such as memory, this queue on first come first serve basis. Length of queue
network bandwidth and required CPU time) and with the help equals to 2mk, where m is number of slave processors and k is

577
virtual machines on each slave processors. This queue will 1) First come first serve algorithm: In this algorithm, Task
maintain a BQFlag. If buffer queue is full then BQFlag is set. is processed according to their arrival timing on the queue.
2) Priority queue (PQ[i]): Task manager will take jobs 2) Round-Robin Algorithm: In this algorithm, the job from
from buffer queue to fill continuously mk size queue and will priority queue is divided evenly to all slave processors.
perform first cost-based and then deadline-based priority in Quantum size for round-robin i.e., number of jobs taken for
case of jobs paying same cost. Obtained priority jobs will get distribution at a time will be equal to slave processors. Order
stored in Priority queue PQ[i]. Task manager uses Flag to fill of job allocation is locally dependent. While distributing jobs,
the queue. If PQFlag is 0 means queue is not filled SFlag of server status is considered.
completely, if it is 1 means queue is full and will not take jobs
from buffer queue. Prioritized Job Scheduling Algorithm
3) Response queue (RQ[i]): This queue size will be equal to
m. Queue will maintain the status of the slave node and // BQ[2mk]: Buffer Queue; PQ[mk]: Priority Queue;
response table in every slot with respect to jobs assigns to RQ[m]: Response Queue;
them. The table stores the information like, slave id, slave // m = number of slave nodes, k= number of virtual
status, job id, processing time and job status. machines;
1. Task manager checks buffer flag to know whether
TABLE II. RESPONSE TABLE
BQ[i] is empty or not.
Slave_ Slave- Job_ Processing 2. if BQFlag = 0 then
VM-ID Job Status
Id Status ID Time
VMS101 J008 15 Completed
task manager will insert new jobs into BQ[i]
VMS102 J003 .. Running else
S01 Alive
VMS103 J001 .. Waiting task manager will wait for some time
3. if PQFlag = 1 then
B. Slave Nodes
jobs will not be copied to PQ[i]
Here we considered the slave nodes with homogenous
else
processors, the processors have same architecture and
computation power, each slave node is at same distance from copy jobs from BQ[i] to PQ[i] according to
master node, due to this the transmission time will be same. arrival time of job
4. Arrange jobs according to cost payment by
1) Job queue (JQ[i]): Each slave processor maintain a jobs
queue, that will assign jobs to the virtual machines and rest of customers.
the jobs will wait for execution in a queue. Its size will equal if cost.PQ[i] ≤ cost.PQ[i+1] then
to 2k, where k is number of virtual machine. When job queue PQ[i] = PQ[i+1]
is full SFlag will set to 1 and will not accept jobs from master 5. Rearrange jobs according to deadline of jobs
node. whose cost is same.
if cost.PQ[i] == cost.PQ[i+1] then
if deadline.PQ[i] > deadline.PQ[i+1] then
PQ[i] = PQ[i+1]
else
Continue
6. use quantum size = mk for distributing prioritized
jobs in round robin manner to m slave processor
if SFlag = 1 then
do not assign job
else
assign job to slave processor
7. maintain RQ[i] for each job assigned to slave
processors.
8. slave processor calculates processing time,
Processing time = Response time + Execution
time.
Fig. 1. Prioritized Job Scheduling with parallelization Technique

IV. PROPOSED ALGORITHM


Existing Algorithms used in systems are:

578
Priority Queue will be full when tasks are fetched from BQ to
where I = instructions in program PQ then PQFlag =1.
CPI = Average cycle per instruction a) Base on Cost ( C )
(decides cost)
T T T T T T T T T T T T T T T
T = Clock cycle time T
12 13 9 6 14 15 7 2 4 5 3 11 1 10 8
9. Total time required to execute job = transmission
C 9 8 7 6 6 6 5 4 4 4 3 3 2 2 1
time + processing time + waiting time in buffer
queue. b) Base on Deadline ( D )
T T T T T T T T T T T T T T T
V. ANALYSIS OF THE SYSTEM T
12 13 9 6 15 14 7 5 4 2 3 11 1 10 8
Let's take one numerical example to analyze the system.
D 4 8 4 6 7 9 6 4 5 6 5 8 5 6 6
TABLE III. NUMERICAL EXAMPLE

Task Cost Deadline Task Cost Deadline


4) Prioritized jobs are distributed to slave processors
using round robin distribution with Quantum size= mk =15.
T1 2 5 T16 7 8
As supposed no. of slave processor (m) = 3 and virtual
T2 4 6 T17 1 10
machine associated with each processor (k) = 5
T3 3 5 T18 11 2 Job Queue JQ[i] = 2k = 2*5 = 10
T4 4 5 T19 1 12 Quantum size for distribution = mk = 15
T5 4 4 T20 10 5 SLAVE 1 SLAVE 2 SLAVE 3
T6 6 6 T21 8 7 JQ[10]
T7 5 6 T22 6 17
VM1 T12 T13 T9
T8 1 6 T23 5 8 VM2 T6 T15 T14
VM3 T7 T5 T4
T9 7 4 T24 5 9
VM4 T2 T3 T11
T10 2 6 T25 9 10 VM5 T1 T10 T8
T11 3 8 T26 10 10
5) As jobs are distributed from PQ then PQ will be
T12 9 4 T27 1 19 empty so PQFlag=0, this indicates to task manager to fetch
T13 8 8 T28 6 9 next 15 jobs From BQ to PQ and prioritize it.
6) Buffer Queue will be
T14 6 9 T29 2 9
T T T T T T T T T T T T T T T
T15 6 7 T30 1 8 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
T T T T T T T T T T T T T T T
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
1) Initial state of Buffer queue (on FCFS)
Suppose m=3, k=5. Hence master queue size =2mk=30
7) Priority Queue will be
T T T T T T T T T T T T T T T a) Basis of Cost ( C )
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
T T T T T T T T T T T T T T T
T T T T T T T T T T T T T T T T 18 20 26 25 21 16 22 28 23 24 29 17 19 27 30
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
C 11 10 10 9 8 7 6 6 5 5 2 1 1 1 1
2) When mk=15 task copied from BQ to PQ then Buffer
queue will be less than 2mk=30, So BQFlag=0 then task
b) Basis of Deadline ( D )
manager will fetch 15 additional task on FCFS basis to fill the
queue. then buffer queue will be, T T T T T T T T T T T T T T T
T 18 20 26 25 21 16 28 22 23 24 29 30 17 19 27
T T T T T T T T T T T T T T T
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 D 2 5 10 7 10 8 9 17 8 9 9 8 10 12 19

T T T T T T T T T T T T T T T
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 8) Prioritized jobs are distributed to slave processors
using round robin distribution with Quantum size= mk=15.
3) Priority queue on basis of cost and deadline

579
SLAVE 1 SLAVE 2 SLAVE 3 same, let's consider it to be, response time = 20 + 0.0001 =
T T T T T T T T T 20.0001 Sec., where 20 Sec. is execution time of jobs assigned
18 25 28 20 21 22 26 16 23
JQ[10] to virtual machine and 0.0001 sec is the time required to
T T T T T T
.... 29 19
...
30 27
... allocate jobs to VMs. Job allocation time to VMs is negligible,
24 17
so let's consider response time to be 20 sec.
VM1 T12 T13 T9
VM2 T6 T15 T14 Now, Processing time for next five jobs that are waiting in the
VM3 T7 T5 T4 job queue will be calculated as, Processing time of next five
VM4 T2 T3 T11 jobs = response time + execution time = 20 + 20 = 40 Sec., for
VM5 T1 T10 T8 all slave nodes.
g) Therefore total time required to execute next 15
9) Status of assigned jobs to each slave node is jobs= transmission time + processing time + waiting time in
maintained by Response Queue in master node. buffer queue = 0.5 + 40 + 0.05= 40. 55sec.
Response table generated for slave node 1 at master node will Thus, total time required to execute 30 jobs will be max {20.5,
40.55} = 40.55sec.
look like,
Processing time of jobs at each slave node is given as,
TABLE IV. RESPONSE TABLE FOR SLAVE NODE 1

Slave Slave- Job Processing Job


VM-ID
_Id Status _ID Time Status
VM1 T12 15 Completed
VM2 T6 .. Running
VM3 T7 18 Completed
VM4 T2 .. Running
VM5 T1 .. Running
S01 Alive VM1 T18 .. Running
VM3 T25 .. Running
T28 .. Waiting
Fig. 2. Processing time of jobs at slave node
T24 .. Waiting
T17 .. Waiting Total execution time required by master node for 30 jobs will
be equal to maximum time required by slave node to execute
10) Suppose execution time for all incoming tasks are jobs and to transmit it. It is given in fig. 3.
same then at slave node 1,
a) Processing time for first five jobs executing on VM
will be equal to Processing time of first five jobs = response
time + execution time = 0 + 20 sec = 20 sec.
b) As slave nodes are homogenous all processors are
same, so time required to process 5 task per slave node is 20
sec.
c) Consider transmission time required by all
Fig. 3. Total execution time at master node
homogenous nodes to be 0.5 sec. First 15 jobs are distributed
to slave nodes without waiting in buffer queue, so it is given 11) Suppose there is only one processor available that
as 0. Therefore total time required to execute first 15 job = prioritize 30 jobs and execute it on its five VM. Consider jobs
transmission time + processing time + waiting time in buffer executing time = 20 sec. then total processing time required is
queue = 0.5 +20 + 0 = 20.5 sec. calculated as:
d) When first 15 jobs are distributed from Priority Here response time and waiting time is same as jobs are
queue, then Priority queue will be empty and it will set executing on same node.
PQFlag to 0 to fetch next 15 jobs from buffer queue for a) Assignment of 1 to 5 jobs to 5 VM, Processing time=
further processing. Before processing these jobs they are in response time + execution time = 0 +20= 20 sec.
buffer queue for waiting state. This waiting time period will b) Assignment of 6 to 10 jobs to 5 VM, Processing
be equal to processing time required to prioritize first 15 jobs time= 20 + 20 =40 sec.
and to allocate these prioritized jobs for round robin c) Assignment of 11 to 15 jobs to 5 VM, Processing
distribution. Consider waiting time to be 0.05 sec. time= 40 +20 = 60 sec
e) After distributing next 15 jobs to slave node, they d) Assignment of 16 to 20 jobs to 5 VM, Processing
will stay in a job queue and will wait for response from VM. time= 60 +20 = 80 sec
f) As we are considering execution time of all jobs is e) Assignment of 21 to 25 jobs to 5 VM, Processing
same then response time for next jobs for five VM will be time= 80 +20 = 100 sec

580
f) Assignment of 26 to 30 jobs to 5 VM, Processing [5] O. M. Elzeki, M. Z. Reshad, M. A. Elsoud, "Improved Max-Min
time= 100 +20 = 120 sec Algorithm in Cloud Computing", International Journal of Computer
So total execution time required by master node will be Applications, vol. 50, July 2012.
[6] Upendra Bhoi, Purvi N. Ramanuj, "Enhanced Max-min Task Sceduling
max{20, 40, 60, 80, 100, 120}= 120 sec.
Algorithm in Cloud Computing", International Journal of Application or
Processing of jobs on single node is given by,
Innovation in Engineering & Management, vol. 2, April 2013.
[7] Shamsollah Ghanbari, Mohamed Othman, "A Priority based Job
Scheduling Algorithm in Cloud Computing", International Conference
on Advances Science and Contemporary Engineering, pp. 778-785,
2012.
[8] S.Rekha and R.Santhosh Kumar, "Priority Based Job Scheduling For
Heterogeneous Cloud Environment", International Journal of Computer
Science Issues, vol. 11, May 2014.
[9] Chandrashekhar S. Pawar, Rajnikant B. Wagh, "Priority Based Dynamic
resource allocation in Cloud Computing" International Conference on
Intelligent Systems and Signal Processing, 2013.
[10] Swachil Patel, Upendra Bhoi, "Priority Based Job Scheduling
Techniques In Cloud Computing: A Systematic Review", International
Journal Of Scientific & Technology Research, vol. 2, November 2013.
[11] Shachee Parikh, Richa Sinha, "Double Level Priority Based
Fig. 4. Processing time of jobs at single node Optimization Algorithm for Task Scheduling in Cloud Computing",
International Journal of Computer Applications, vol. 62, January 2013.
By comparing graphs for considered example, we can say [12] A.Kousalya, R.Radhakrishnan, "A Comparative Study of Parallel Job
that total time required to execute jobs with parallel Scheduling Algorithms in Cloud Computing", International Journal of
distribution is 40.55 sec whereas total time required to execute Computer Science and Information Technologies, vol. 6, 2015.
job on single node is 120 sec. Thus by executing jobs using [13] C.S.Banupriya, "Improved Priority Based Parallel Workloads using
master slave system we execute jobs 120-40.55= 79.45 sec Multi Attribute Scheduling Algorithm in Cloud", International Journal
early by saving more than 60% time of master node. of Scientific & Engineering Research, vol. 5, May 2014.

VI. RESULT AND CONCLUSION


We have proposed a prioritized job scheduling algorithm
with parallelization technique that provides a higher
throughput and maintains quality of services of cloud.
In this technique, Master node assigns priority to jobs on
the basis of cost and deadline. Prioritized jobs are distributed
among slave node in round robin manner. Slave node executes
jobs in first come first serve basis.
As Master Processor Distributes its workload among slave
node, it improves performance & resource utilization of the
system and reduces makespan of task and it saves execution
time of master node by almost 60%.

VI. REFERENCES
[1] Fazel Mohammadi, Dr. Shahram Jamali, Masoud Bekravi, "Survey on
Job Scheduling algorithms in Cloud Computing", International Journal
of Emerging Trends of Technology in Computer Science, vol. 3, March-
April 2014.
[2] Rajveer Kaur, Supriya Kinger, "Analysis of Job Scheduling Algorithms
in Cloud Computing", International Journal of Computer Trends and
Technology, vol. 9, Mar 2014.
[3] Eakta Kumari and Monika, "A review on Task Scheduling Algorithms
in Cloud Computing", International Journal of Science, Environment
and Technology, vol. 4, 2015.
[4] Aditya Marphatia, Aditi Muhnot, Tanveer Sachdeva, Esha Shukla, Prof.
Lakshmi Kurup, "Optimization of FCFS Based Resource Provisioning
Algorithm for Cloud Computing", IOSP Journal of Computer
Engineering, vol. 10, Mar-Apr-2013.

581

You might also like