You are on page 1of 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/329073318

A Novel Genetic Algorithm Based Scheduling for Multi-core Systems

Chapter · January 2019


DOI: 10.1007/978-981-13-2414-7_5

CITATIONS READS

0 59

3 authors:

Aditi Bose Tarun Biswas


National Institute of Technology Sikkim National Institute of Technology Sikkim
2 PUBLICATIONS   0 CITATIONS    8 PUBLICATIONS   13 CITATIONS   

SEE PROFILE SEE PROFILE

Pratyay Kuila
National Institute of Technology Sikkim
33 PUBLICATIONS   724 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Application of heuristics/meta-heuristics for predictive maintenance of manufacturing systems View project

All content following this page was uploaded by Pratyay Kuila on 06 December 2018.

The user has requested enhancement of the downloaded file.


A Novel Genetic Algorithm Based
Scheduling for Multi-core Systems

Aditi Bose, Tarun Biswas and Pratyay Kuila

1 Background and Motivations

The MCS may consist of several processors which are heterogeneous in nature in
terms of resources capacity, working platform, topology, etc. Let, an application is
submitted to the system and one core or processor is not sufficient to execute the
application. Then, the computationally challenged application is distributed among
the multiple cores so the system as a single coherent unit to execute the assigned
application as early as possible. Based on the characteristic of an application, the
execution is performed in two different ways like static and dynamic scheduling
[1–6]. The main aim of task scheduling is to how well task assignment is done to
the processors? The assignment of task should be done in such a way that it should
lead to faster possible completion time. If the tasks are assigned to the processors
in an uneven manner, then one or two processors became heavily loaded. Moreover,
it may also happen that some of the resources are extensively used and some of
the costly resources remain unused. As a result, the performance of the system may
be degraded in terms of overall completion time, response time, resource utilization,
load balancing, speedup factor, etc. [1–3, 7–9]. Therefore, we are motivated to design
a scheduling algorithm for a multi-core system by addressing makespan, utilization
of resources, and speedup ratio. It should be noted that the scheduling on a multi-
core systems (MC S) is a NP-complete problem. In this paper, we proposed a genetic
algorithm based scheduling technique with the following objectives: minimization
of makespan, maximization of resource utilization, and maximization of speedup
ratio. Our main contributions in this paper are summarized as follows.

A. Bose · T. Biswas (B) · P. Kuila


Department of Computer Science and Engineering, National Institute of Technology,
Ravangla 737139, Sikkim, India
e-mail: tarun.nitskm@gmail.com
A. Bose
e-mail: aditibasusarkar@yahoo.com
P. Kuila
e-mail: pratyay_kuila@yahoo.com

© Springer Nature Singapore Pte Ltd. 2019 45


S. Tiwari et al. (eds.), Smart Innovations in Communication and Computational
Sciences, Advances in Intelligent Systems and Computing 851,
https://doi.org/10.1007/978-981-13-2414-7_5
46 A. Bose et al.

• A genetic algorithm based scheduling problem is proposed by considering three


conflicting objectives.
• An efficient representation of chromosome that gives complete solution to the
problem. The validity of the chromosomes can be ensured even after crossover
and mutation operation.
• Derivation of multi-objective fitness function by considering all the conflicting
objectives.
• The proposed algorithm has been validated through simulated results by consid-
ering synthetic as well as benchmark data sets [10] as presented in Sects. 5.1 and
5.2 respectively.
The remainder of this paper is organized as follows. Section 2. describes the
state of the art of current literature on scheduling algorithms. In Sect. 3, we present
ILP formulation of the problem and terminologies used to describe the work. The
proposed GA-based task scheduling algorithm is presented in Sect. 4. In Sect. 5, we
have analyzed and validated the proposed work improvements comparing with some
existing algorithms with synthetic as well as benchmark data sets. We conclude our
work with future possibilities in Sect. 6.

2 Related Works

There are several relevant task scheduling algorithms as follows.


A genetic algorithm based task scheduling is presented for heterogeneous com-
puting system [11]. The authors have done the simulation by considering processing
power which improves makespan and average processor utilization simultaneously.
In [12], the authors presented a hybrid heuristic genetic algorithm with adaptive
parameter (HGAP) which operates based on heuristic earliest finish time and genetic
algorithm. The parameters of crossover probability are adaptive according to the cur-
rent evolution status to promote evolution and find better solution. They have con-
sidered only one objective, i.e., minimization of makespan. A genetic algorithm for
task scheduling on heterogeneous computing systems using multiple priority queues
is presented in [13]. The assignment of task to processor is done by a heuristic based
earliest finish time (HEFT) approach where the computation of priority or rank of
a task is highly time consuming. It deals with a single objective, i.e., minimization
of makespan. An efficient non-dominated sorting genetic algorithm II (NSGA-II)
encoding for large-scale multi-objective resource allocation scheme is addressed in
[14]. Here, the information of tasks is known in advance. The worked environment
is highly heterogeneous in the machines power consumption, task execution time,
etc. The authors simultaneously optimized makespan and energy consumption. The
authors proposed a template-based genetic algorithm (TBGA) task scheduling by
considering users QoS constraints [15]. The algorithm first calculates the template
size for each processor. Templates are nothing but the maximal size of tasks that
can be allocated to a processor. Then, the algorithm combines tasks to each template
A Novel Genetic Algorithm Based Scheduling for Multi-core Systems 47

according to the size and then assign to the processors by using genetic algorithm.
It considered one objective, i.e., minimization of makespan.
The above algorithms considered minimization of makespan or maximization
of resource utilization. Our proposed work, genetic algorithm based scheduling for
independent task over multi-core system is done by considering three objectives, min-
imization of makespan, maximization of utilization, and maximization of speedup
ratio.

3 Problem Statement and Terminologies

In the proposed work, a set of n tasks, θ = {θ1 , θ2 , θ3 , . . . θn } is to be scheduled on


different m processors, i.e., λ = {λ1 , λ2 , λ3 , . . . λm }. The communication channels
are assumed to be contention free. The task is dispatched to the processor and sched-
uled by the scheduling algorithm. We formulate the addressed problem in terms of
linear programming problem (LPP). Let αir be a Boolean variable defined as follows:


⎨1, if θi is assigned to λr
αir = (1)


0, Otherwise.

Then, the linear programming problem (LPP) can be formulated as follows:

Minimize F1 = Max{F T (θi )|∀θi ∈ θ }


Maximize F2 = U T
Maximize F3 = S P
Subject to

m
αir = 1, ∀i, 1 ≤ i ≤ n (2)
r =1

The following terminologies are used to describe the proposed algorithm:


• The execution time ξ T (θi , λr ) of task θi on the processor λr is calculated by the
following equation.
ωi
ξ T (θi , λr ) = op (3)
fr
op
where ωi is the instruction size of the task and θi and fr are the operating fre-
quency of the processor λr .
• The actual start time, AST (θi , λr ) of θi on processor λr means the task is started
its execution on the processor at that time.
48 A. Bose et al.

Fig. 1 Representation of
chromosome

• The release time of the processor λr initially is 0. After execution of task θi , it is


calculated by the following equation:

RT (λr ) = RT (λr ) + ξ T (θi , λr ) (4)

• The finish time F T (θi ) means the sum of the execution time and the actual start
time of the task θi on processor λr which is given as follows:

F T (θi ) = ξ T (θi , λr ) + AST (θi , λr ) (5)

4 Proposed Work

The proposed work genetic algorithm based scheduling in multi-core system consists
of the following sections as discussed below.

4.1 Representation of Chromosome

The chromosome should always give a complete solution to the problem. Here, a
chromosome is a string of randomly generated processor number. Initial population
is created by randomly generated PS I Z E of chromosomes, where PS I Z E is the pop-
ulation size. Let us assume a system with a set of 10 tasks θ = {θ1 , θ2 , θ3 , . . . , θ10 }
and 3 processors λ = {λ1 , λ2 , λ3 }. It can be observed from Fig. 1 that the 2nd gene
position is one, which indicates that the θ2 is assigned to λ1 . Accordingly, θ1 , θ3 , and
θ5 is assigned to λ2 , λ3 and λ2 respectively.

4.2 Derivation of Fitness Function

To derive the fitness value, we have considered three objectives like minimization
of makespan, maximization of processor utilization, and maximization of speedup
ratio. Here, each chromosome is evaluated by the fitness value and finds out the
best solution for our problem. The detailed derivation of the fitness function is given
below.
• Minimization of Makespan: Each task θi ∈ θ should be assigned to the processors
so that the execution can be completed within the shortest possible time. Therefore,
the first objective can be described as follows:
A Novel Genetic Algorithm Based Scheduling for Multi-core Systems 49

Objective 1 (O1 ) : Minimize (Mks) (6)

where, Mks = Max (F T (θ1 ), F T (θ2 ), F T (θ3 ) . . . F T (θn )).


• Maximization of Processor Utilization: It can be defined as the ratio between
average amount of time in which the processors are busy by the overall system
schedule time. It is calculated as follows:
m
1 ξ T (λr )
UT = × r =1 (7)
Mks m
Now, the second objective can be stated as:

Objective 2(O2 ) : Maximize (U T ) (8)

• Maximization of Speedup: The speedup factor can be defined as the ratio between
sequential execution time by makespan (parallel schedule length) as given below.
n
ξ T (θi , λr )
SP = i=1
(9)
Mks

Objective 3(O3 ) : Maximize (S P) (10)

Note that the above objectives are conflicting with each other. Here, we have used
weighted sum approach (WSA) [13] to compute the fitness function. WSA is a
classical approach for optimizing the multi-objective task scheduling problem,
where each objective is assigned a weight. Our goal is to choose the solution
with minimum fitnessvalue. Let the weight value of the parameters be β1 , β2 , β3 ,
respectively, where 3j=1 β j = 1. The fitness function of the proposed work is as
follows:

Fitness = β1 × Mks + β2 × (1 − U T ) + β3 × (1 − S P) (11)

Our final objective is to minimize Fitness.

4.3 Crossover, Mutation, and Selection

In crossover, two parent chromosomes mate to produce two child chromosomes.


There are many crossover operations like, one-point, two-point, hybrid, etc. Here,
we have used one-point crossover as shown in Fig. 2a. The crossover operation is
followed by mutation, where the child chromosomes are mutated for possible bet-
terment. In mutation, a gene position is randomly selected and the value is replaced
by another valid value as shown in Fig. 2b. In the selection operation, better chromo-
somes are selected based on the fitness value.
50 A. Bose et al.

(a)

(b)

Fig. 2 a Crossover and b mutation operation

The pseudo code of proposed scheduling is given in the Algorithm 1.

5 Result and Discussions

We have done the simulations to demonstrate our proposed work on a system which
is running on Intel i7 3.4 GHz CPU with 4 GB of RAM. The proposed work is
implemented by using C programming on Ubuntu 14.04 operating system. We have
used a robust selection mechanism, Roulette Wheel selection procedure, that selects
parents based on their fitness values. Here, we have used the weighted sum approach
(WSM) for calculating the fitness of a chromosome by considering the mentioned
conflicting objectives. Our algorithm is analyzed and validated by the synthetic as
well as benchmark data set [10] as follows.

Algorithm 1 : Genetic algorithm based task scheduling


Input: (1) A List of n tasks θi where, ωi denotes ith task instruction size and ∀θi ∈ θ
(2) A List of m processor λr corresponding frequencies.
Output: An efficient mapping of tasks to the processors, θi → λr .
1: Create Initial population, say PI N I .
2: Apply Selection operation to find new population PN E W with PS I Z E number of chromosomes.
3: Initialize g = 0;
4: while (g = T er minate) do
5: Randomly select two parent chromosome (say p1 and p2 ) from PN E W .
6: Apply crossover on p1 and p2 to generate offsprings (Ch 1 and Ch 2 ).
7: if (fitness(Ch 1 ) < fitness( p1 )) then
8: Ch 1 replaces p1 in PN E W .
9: end if
10: if (fitness(Ch 2 ) < fitness( p2 )) then
11: Ch 2 replaces p2 in PN E W .
12: end if
13: g + +;
14: end while
15: Select the minimum fitness value chromosome as final solution.
A Novel Genetic Algorithm Based Scheduling for Multi-core Systems 51

(a)
(b)

(c)

Fig. 3 Simulation results on synthetic data sets a makespan, b utilization, and c speedup ratio

5.1 Simulation on Random Data Set

The proposed work is simulated by considering four randomly generated data sets
like, (1) 100 tasks with 3 processors (100 × 3), (2) 200 tasks with 3 processors
(200 × 3), (3) 500 tasks with 5 processors (500 × 5), and (4) 1000 tasks with 10
processors (1000 × 10). Here, the size of the tasks is also randomly generated and
the used weight values 0.5, 0.3, 0.2 for the calculation of fitness value. The pictorial
representation of the simulation results is shown in Fig. 3a–c. To show the effective-
ness of the proposed work, we have also validated our work by benchmark data set
[10] as discussed below.

5.2 Simulation on Benchmark Data Set

Here, two data sets 256 tasks on 8 processors (256 × 8) and 512 tasks on 16 proces-
sors (512 × 16) have been considered to validate the work. The data sets contain 12
instances which helps in scheduling [10]. The instances are expressed as u_x_yyzz
where u denotes instances generated by the uniform distribution, x denotes the con-
sistency as follows, consistent (c), inconsistent (i), or semi-consistent (s)]. The yy
shows heterogeneity [i.e., high (hi) or low (lo)] of the task and zz shows the hetero-
geneity [i.e., high (hi) or low (lo)] of the processor. The u_c_hihi, u_c_hilo, u_c_lohi,
u_c_lolo, u_i_hihi, u_i_hilo, u_i_lohi, u_i_lolo, u_s_hihi, u_s_hilo, u_s_lohi, and
52 A. Bose et al.

(a)

(b)

(c)

Fig. 4 Simulation results on benchmark data sets a makespan, b processor utilization, and c speedup
ratio
A Novel Genetic Algorithm Based Scheduling for Multi-core Systems 53

u_s_lolo are the generated 12 different instances of the set. We have evaluated our
work by considering the sets based on makespan, utilization, and speedup ration.
It has been observed that the proposed algorithms Pr o − G A perform better than
GAHDCS [11], HGAAP [12], and PGA [16] in terms of considered objectives.
It observed that the proposed algorithm produces lesser makespan due to adjust-
ment of tasks to the available processors based on the earliest finish time. Therefore,
before assigning a task to the processor, the actual start time is calculated which
helps in finding the EFT. So, the overall execution is minimized by utilization of the
cores and improve the speedup ratio. We have shown the pictorial representation of
performance study of the proposed work as in Fig. 4a–c.

6 Conclusions

In this paper, we have designed a genetic algorithm based independent task schedul-
ing for multi-core system. The experimental results show that the proposed algorithm
has considerable improvements over the GAHDCS, HGAAP, and PGA in terms of
the considered objectives. To show the effectiveness, the proposed work is validated
by synthetic and benchmark data set. However, the proposed algorithm does not con-
sider dependency of the tasks and energy optimization of the processor. In future,
our attempt will be to develop a new energy-efficient scheduling algorithm with
dependency constraints.

References

1. Jiang, J., Lin, Y., Xie, G., Fu, L., Yang, J.: Time and energy optimization algorithms for the
static scheduling of multiple workflows in heterogeneous computing system. J. Grid Comput.
1–22 (2017)
2. Gogos, C., Valouxis, C., Alefragis, P., Goulas, G., Voros, N., Housos, E.: Scheduling inde-
pendent tasks on heterogeneous processors using heuristics and column pricing. Future Gener.
Comput. Syst. 60, 48–66 (2016)
3. AlEbrahim, S., Ahmad, I.: Task scheduling for heterogeneous computing systems. J. Super-
comput. 73(6), 2313–2338 (2017)
4. Biswas, T., Kuila, P., Kumar Ray, A.: Multi-level queue for task scheduling in heterogeneous
distributed computing system. In: 2017 4th International Conference on Advanced Computing
and Communication Systems (ICACCS), pp. 1–6. IEEE (2017)
5. Amalarethinam, D.G., Kavitha, S.: Priority based performance improved algorithm for meta-
task scheduling in cloud environment. In: 2017 2nd International Conference on Computing
and Communications Technologies (ICCCT), pp. 69–73. IEEE (2017)
6. Alkayal, E.S., Jennings, N.R., Abulkhair, M.F.: Efficient task scheduling multi-objective parti-
cle swarm optimization in cloud computing. In: 2016 IEEE 41st Conference on Local Computer
Networks Workshops (LCN Workshops), pp. 17–24. IEEE (2016)
7. Liu, Y., Zhang, C., Li, B., Niu, J.: Dems: a hybrid scheme of task scheduling and load balancing
in computing clusters. J. Netw. Comput. Appl. 83, 213–220 (2017)
54 A. Bose et al.

8. Vasile, M.-A., Pop, F., Tutueanu, R.-I., Cristea, V., Kołodziej, J.: Resource-aware hybrid
scheduling algorithm in heterogeneous distributed computing. Future Gener. Comput. Syst.
51, 61–71 (2015)
9. Biswas, T., Kumar Ray, A., Kuila, P., Ray, S.: Resource factor-based leader election for ring
networks. In: Advances in Computer and Computational Sciences, pp. 251–257. Springer
(2017)
10. Braun, T.D., Siegel, H.J., Beck, N., Bölöni, L.L., Maheswaran, M., Reuther, A.I., Robertson,
J.P., Theys, M.D., Yao, B., Hensgen, D.: A comparison of eleven static heuristics for mapping
a class of independent tasks onto heterogeneous distributed computing systems. J. Parallel
Distrib. Comput. 61(6), 810–837 (2001)
11. Jooyayeshendi, A., Akkasi, A.: Genetic algorithm for task scheduling in heterogeneous dis-
tributed computing system. Int. J. Sci. Eng. Res. 6(7), 1338 (2015)
12. Ding, S., Wu, J., Xie, G., Zeng, G.: A hybrid heuristic-genetic algorithm with adap-
tive parameters for static task scheduling in heterogeneous computing system. In: Trust-
com/BigDataSE/ICESS, 2017 IEEE, pp. 761–766. IEEE (2017)
13. Yuming, X., Li, K., Jingtong, H., Li, K.: A genetic algorithm for task scheduling on heteroge-
neous computing systems using multiple priority queues. Inf. Sci. 270, 255–287 (2014)
14. Friese, R.D.: Efficient genetic algorithm encoding for large-scale multi-objective resource allo-
cation. In: 2016 IEEE International Parallel and Distributed Processing Symposium Workshops,
pp. 1360–1369. IEEE (2016)
15. Sheng, X., Li, Q.: Template-based genetic algorithm for qos-aware task scheduling in cloud
computing. In: 2016 International Conference on Advanced Cloud and Big Data (CBD), pp.
25–30. IEEE (2016)
16. Kwok, Y.-K., Ahmad, I.: Efficient scheduling of arbitrary task graphs to multiprocessors using
a parallel genetic algorithm. J. Parallel Distrib. Comput. 47(1), 58–77 (1997)

View publication stats

You might also like