• No results found

WORKFLOW MODELING QOS BASED ROBUST TASK SCHEDULING

B. TIME VARYING DYNAMIC BAYESIAN NETWORKS

V. WORKFLOW MODELING QOS BASED ROBUST TASK SCHEDULING

Task scheduling based on QoS requirements is an important factor that goes into determining the overall utility metric of the player. In this paper, we describe the important metrics from an defenders perspective in providing secure and reliable QoS.

Upon profiling, prioritizing, and determining the tradeoffs of performing some tasks over others, we need to determine an appropriate makespan (scheduling length) to reduce the overall latency. Since decisions about the order of task completion are made based on the QoS requirements of both the user and CPS application, we generically use three basic QoS requirements cost, latency and reliability upon which we determine the effectiveness of the performance. The overall latency is affected by the delays in task completion, cost is determined by the number of service instances (Virtual Machines) on the cloud used for information processing, the migration of information among Virtual Machines (VMs) and other costs specified in Service Level Agreements (SLAs). Finally, reliability is the overall availability of the CC platform to serve the QoS requirements of the user or the CPS appli- cation. Of the three QoS requirements, cost is the most volatile and sensitive factor that is easily affected by the other two QoS requirements. Hence, cost as a determinant of effective workflow modeling under delays is discussed in detail under latency and reliability.

The function of the workflow scheduler is to allocate all tasks in the workflow to available resources (VMs) to generate a concrete workflow that minimizes latency and cost and maximizes the reliability. The scheduling model also incorporates user-defined thresh- olds for QoS parameters, i.e., task completion deadlines, budget for application processing, and the lower bound on reliability expected from the CC platform. Hence, the objective of the scheduler is to find a schedule that optimizes the user-preferred QoS parameters and satisfies all the user-placed QoS restrictions.

flow as a Directed Acyclic Graph (DAG) G = (V, E). Let n be the number of tasks in the workflow. The set of nodes V = {T1, T2, ..., Tn} corresponds to the tasks of the workflow.

The set of edges E represents precedence relations between tasks. An arc is in the form of (Ti, Tj) where Ti is called the parent task of Tj and Tj is the child task of Ti with each

task having an execution time eti. A child task can only be executed until all of its parent tasks have been completed. The set of parent tasks of Tiis denoted by par(Ti), and the set

of child tasks by chi(Ti). Each task Ti, where 1 ≤ i ≤ n, has a computational domain

Si = {si1, si2, ..., simi} where, sij represents a service instance (VM) provided by the cloud

service provider and miis the total number of available service instances for Ti. The prop-

erties of a service instance can be denoted as a tuple (sij.r, sij.l, sij.c) where the terms in

the tuple correspond to the reliability, latency and cost of the chosen service instance. Task precedence specifies the execution order of tasks that a feasible solution must/can satisfy. We now define the three QoS constraints based on which the DAG is constructed.

Reliability constraints: The reliability of the generated concrete workflow must not be smaller than a user-defined variable reliability constraint. In other words, given a schedule Sc∈ (Sc1, ..., Scn) which implies Tiis executed by siSci, if Sc.reliability is the reliability of

a schedule Sc then Sc satisfies the user defined Reliability only if

min siSci. r ≥ Reliability (4)

Latency constraints: Total execution time of the workflow must not be larger than the application specific Deadline.

Sc.Latency = max siSci. l ≤ Deadline (5)

Cost constraints: Given a schedule Sc ∈ (Sc1, ..., Scn), the total cost of Sc.cost must not be

Sc.Cost =

siSci. c ≤ Cost (6) We solved the problem of scheduling by a heuristics aided schedule selection method. Since there are multiple QoS parameters that affect and determine the stability of a CPS, heuristically providing insights into their requirements will yield different solutions at dif- ferent time instants. Employing this solution instead of a singly selected scheduling mech- anism at the start of the process will naturally yield accurate estimation results and help us in providing security, reliability and optimized cost. Since this scheduling method is aided by the decision output from our SNFG, employing a heuristic method is almost equivalent to an exhaustive approach as decisions taken by players are based on incomplete informa- tion which requires considering multiple input parameters. The following are a few of the heuristics.

Reliability heuristic: This heuristic promotes the scheduler to select a scheduling policy that ensures reliability. The reliability requirements are determined by the most critical system in the hybrid system or by the system that causes communication bottlenecks by using most of the bandwidth. A drop in the communication packets can render the system unstable, thereby, heavily affecting the reliability of the system. Hence, to determine the level of importance to be given to a scheduling policy, we have to determine the reliability criticality (RCi, j) by (7).

Time heuristic: The Time heuristic biases the selection of the service instances with shorter execution time. Denoted by (TCi, j), it can be determined by (8).

Cost heuristic: The Cost heuristic biases the selection of the service instances with lowest overall cost. Denoted by (CoCi, j), it can be determined by (9).

RCi, j=

sij.r − min.reli + 1 max.reli− min.reli+ 1

TCi, j = max.timei− sij.l + 1 max.timei− min.timei+ 1 (8) CoCi, j= max.costi− sij.l + 1 max.costi− min.costi+ 1 (9)

where min.rel is the lowest reliability value of the service instant for a particular node (schedule) and max.rel is the maximum of the values in (7); min.time is the lowest latency value of the service instant for a particular node (schedule) and max.time is the maximum of the values in (8); min.cost is the lowest cost incurred in using the service instant for a particular node (schedule) and max.cost is the maximum of the values in (9).

A. TASK SCHEDULING ALGORITHM

We would now like to describe our task scheduling algorithm that takes into account the above mentioned QoS constraints. Task scheduling on the VMs is extremely critical as it determines the overall makespan. It is also instrumental in meeting with the application specific delay constraints. It must be noted that Scheduling and Load Balancing on the available resources are two distinct concepts of heterogeneous computing. Our Secure Task Scheduling Algorithm (STSA) starts by prioritizing the tasks based on the importance of their processing on the overall system behavior. This is done by determining the risk associated with the on-time task completion in addition to an attack detection by the SNFG. The attack risk probability γais modeled as a negative exponential given by

γa= 1 − eλ(UA−UD) (10)

where, UDand UAare the defense and attack strategies of the defender and attacker.

Equation (10) implies that the risk probability grows as the difference between the two util- ities grows. Then, using the concepts of queuing theory, the scheduler calculates the mean

service time on a VM on the cloud, the average waiting time for a schedule to be cleared off the queue (waiting time on the queue Wq) and schedules the incoming tasks accordingly.

The tasks are prioritized based on γa and its out/in degree (dependency on other tasks).

This ensures that resources are provided to the tasks with high urgency. However, there is a down side to this approach. There could be tasks that might never meet the emergency criteria and remain in the queue forever. In order to break such a deadlock, we define a preset maximum allowable time threshold ψ beyond which it has to be allotted a comput- ing resource. ψ is determined using τmad which is the maximally allowable delay before

which QoS requirements for the CPS have to be serviced. This τmad is the Deadline men-

tioned previously in equation (5).This threshold value is obtained by taking as reference, the largest allowable waiting time on a task based on previous experiences. Algorithm 7 is our Secure Task Scheduling Algorithm (STSA) under the QoS constraints.