• Tidak ada hasil yang ditemukan

Scheduling on Machines with Equal Failure Rate

In this section, we consider the problem of scheduling of jobs to machines with equal failure rate (fj =f). As scheduling of jobs with a common deadline on machines with equal failure rate (Non-preemptive version) was proved to be NP-Complete [212], so we design an efficient heuristic to solve the problem. We propose heuristic for efficient replication in case of machine with equal failure rate (REFR), and design of this is based on the observation as reported in Figure 6.1. Figure 6.1 reports the reliability of a task with respect to execution time (Figure 6.1(a)), failure probability of the allocated machine (Figure 6.1(b)), and number of replicated copy of the deployed task (Figure 6.1(c)). The observations from Figure 6.1 are (a) reliability of a task decreases as its execution time increases when allocated to a machine with constant failure probability, (b) reliability of a task decreases if it is allocated to a machine with high failure rate keeping execution time constant, and (c) more number of replications of a task increases the reliability of a task where execution time and failure probability of the allocated machine are constant. These observations motivate us to schedule the VMs to PMs so that the reliability requirements are met.

Definition 2 (Lower bound on number of machines) : The preemptive schedule of n jobs which finish their execution before their common deadline D on m machines with equal failure rate (fi =f) is possible if

a) ei 6D for each job Ji and,

6.5. SCHEDULING ON MACHINES WITH EQUAL FAILURE RATE

0 20 40 60 80 100

Task execution time (t) 0.0

0.2 0.4 0.6 0.8 1.0

Reliability : exp( tf)

f = 0.05

(a) Reliability verses task execution time

0.06 0.08 0.10 0.12 0.14

Failure probability (f) 0.05

0.10 0.15 0.20 0.25 0.30 0.35

Reliability : exp(tf)

t = 20

(b) Reliability verses failure probability

2 4 6 8 10

Number of replica ions 0.2

0.3 0.4 0.5 0.6 0.7 0.8 0.9

Reliabili y : exp(−tf)

= 100,f=0.015 (c) Reliability verses no. of task replication

Figure 6.1: Reliability distribution of tasks

b)

n

X

i=1

(vi +ki).ei 6 γ.m.D, where ki represents the number of extra VMs (lower bound) deployed for the job Ji to satisfy it’s reliability requirement and v rep- resents the maximum number of virtual machines that a machine can host. All the jobs must satisfy it’s reliability requirement by allocating to any machine.

The definition of the lower bound number of machines (m) as defined in [117], as- suming a task can be preempted and migrated infinite time without any delay. As stated in (b), the lower bound on number of machines, the minimum number of PMs required to schedule all the jobs to finish their execution before deadline, the following condition is obtained.

γ.m.D >

n

X

i=1

(vi+ki).ei (6.13)

As the number of PM (m) required to be an integer value, the lower bound of m is

represented as follows.

m>

n

X

i=1

(vi+ki).ei γ.D

(6.14)

The formal description of the problem under consideration is to find the minimum number of task replications and its assignment to PMs so that all the jobs must satisfy their reliability and deadline requirements.

As all the machines have the same failure rate (fj = f) and same capacity (γj =γ) in terms of the maximum number of VM deployment, the task can be scheduled to any machine so that no two copies of the same task would be allocated to the same machine. If any job satisfies it’s reliability requirement without any replication then for that job ki = 0 else extra copies of the tasks need to be deployed. If all the machines have the same failure (fi = f) rate then the reliability of a task with k copies running parallelly is represented as follows.

R(Til) = 1−(1−e−f.ei)k (6.15) For each job at least vi number of copies must be scheduled and more copies of the tasks may be required to meet the reliability requirement. Supposekinumber of extra copies are required to meet the reliability requirement for a job then to compute the number of replications we defined the equation as follows.

1−(1−e−f.ei)vi+ki >ri,for all i=1 to n (6.16) Further simplifying the Eq. 6.16,

1−ri = (1−e−f.ei)vi+ki (6.17) 1−ri

(1−e−f.ei)vi = (1−e−f.ei)ki (6.18) ki = log1−ef.ei(1−ri)−vi (6.19)

6.5. SCHEDULING ON MACHINES WITH EQUAL FAILURE RATE

As the value of ki is an integer so the value is represented as follows.

ki =

log1−ef.ei(1−ri)−vi

(6.20) From the Eq. 6.20, the known factors aref, ei, vi, andri, so we compute the number of replications of each job and allocate those to the available PMs so that no job misses its deadline requirement. If any job satisfies it’s reliability requirement without any replication then the value ofki is zero for that job.

The pseudo-code of the approach is given in Algorithm13. In the algorithm we first compute the (vi +ki) value for each job using Eq. 6.20. As the failure rate of all machines is equal so the VM requirement depend on the three factors i.e., execution time (ei), reliability requirement (ri), and the number of tasks (N). In this algorithm, we allocate each task to different machines from the set of currently active machines (Ma) so that reliability is enhanced. We sort the jobs based on vi0 = vi +ki value.

The algorithm calculates the minimum number of machines required for allocation using Eq. 6.14 and then allocate the tasks to different machines where it satisfies its deadline requirement. The sub-procedure EF T(), returns the earliest finish time of a task when assigned to a particular machine. There is no need to check for the reliability requirement because the algorithm computes the v0i value satisfying the reliability requirement of each job. While scheduling, the primary copies of the tasks (vi number of copies) are scheduled first and then the extra copies (ki) are allocated.

The approach is non-preemptive approach and produce always equal or higher number of machines required as compared to lower bound mentioned in Eq. 6.14.

Algorithm 13 Replication with Equal Failure Rate (REFR)

1: Calculate ki for each job using Eq. 6.20

2: Sort the jobs by their decreasing order of their VM requirements (v0i =vi+ki)

3: Calculate the minimum number of PMs (Ma set) using Eq. 6.14 and switch on those machines

4: for each job Ji in J do

5: while vi0 >0 do

6: for each PM Mj from Ma do

7: if EFT(Til, Mj) ≤D and (no copy of Til assigned to Mj) then

8: Allocate Til to machine Mj

9: v0i =vi0 −1

10: if no machine foundthen

11: Switch on a new machine and add to Ma set

The time complexity of the Algorithm 13 is analyzed as follows. Step 1 of the algo- rithm takesO(n) time and step 2 takesO(nlogn) times. Mostly the time complexity of the algorithm is being dominated by the computation time taken by step 4 - 11.

The maximum time taken by step 4 -11 can be expressed as O(mn), where n is the number of tasks, andm represents the number of machines.

6.6 Scheduling on Machines with Different Failure