A Logical Framework for Workflow Scheduling under Resource - - PowerPoint PPT Presentation

a logical framework for workflow scheduling under
SMART_READER_LITE
LIVE PREVIEW

A Logical Framework for Workflow Scheduling under Resource - - PowerPoint PPT Presentation

A Logical Framework for Workflow Scheduling under Resource Allocation Constraints Pinar Senkul ( Middle East Technical University, Ankara, Turkey ) Michael Kifer (Stony Brook University, USA) Ismail H. Toroslu (Middle East Technical


slide-1
SLIDE 1

A Logical Framework for Workflow Scheduling under Resource Allocation Constraints

Pinar Senkul

(Middle East Technical University, Ankara, Turkey)

Michael Kifer

(Stony Brook University, USA)

Ismail H. Toroslu

(Middle East Technical University, Ankara, Turkey)

slide-2
SLIDE 2

Problem

Workflow Scheduling:

Find execution sequence of tasks in a workflow workflow so that all constraints constraints are satisfied

slide-3
SLIDE 3

Definitions

Workflow:

A coordinated set of activities that act together to achieve a well-defined goal

Constraints:

Temporal/causality

Do t1 only after t2 and t3 have been executed Do t1 if t2 has been or will be executed

Resource allocation

Execute workflow keeping the cost below threshold Don’t use same machine for concurrent subtasks in workflow

slide-4
SLIDE 4

Problem (contd.)

Most works deal with temporal/causality constraints We deal with resource allocation constraints

slide-5
SLIDE 5

Example: House Construction Workflow

The budget should not exceed the given amount The construction should not last longer than the given duration Different companies must be chosen for parallel tasks

slide-6
SLIDE 6

Approaches to Workflow Scheduling

Operations Research AI Petri Nets Logic (temporal, concurrent transaction logic)

slide-7
SLIDE 7

Our Approach

CCTR – Concurrent Constraint Transaction Logic

Integrates Concurrent Transaction Logic (CTR) with Constraint Logic Programming (CLP) Gives precise semantics to workflows Can

Model Reason about Schedule

workflows

slide-8
SLIDE 8

Overview of Concurrent Transaction Logic

Extension of first order logic for programming, executing and reasoning with state changing concurrent processes. Syntax wall ⊗ (( carpentry ⊗ roof ) | installation )

execute wall then in parallel do:

carpentry followed by roofing installation work

Semantics – paths 〈D0D1D2D3D4〉

wall wall carpentry carpentry install install roof roof

D0 D1 D2 D3 D4

any interleaving of carpentry⊗roof and installation is a valid execution

Path: sequence of DB states that result from execution of activities

slide-9
SLIDE 9

Concurrent Constraint Transaction Logic (CCTR)

syntax: same as in CTR semantics: partial schedule is more structured than a path, parallel and serial parts of the execution are explicitly shown.

e.g. (〈D0D1〉)•p(〈D1D2•pD2D3〉 ||p〈D1D4〉)

slide-10
SLIDE 10

Resources

resource: an object with the attributes cost, token resource assignment: a partial mapping partial schedules → set of resources

slide-11
SLIDE 11

Constraint System

A partial schedule satisfies satisfies a resource allocation constraint c if c(partial schedule, resource assignment) is true. A constraint system constraint system is a set of constraint

  • definitions. It consists of

cost subsystem cost subsystem: contains definitions of cost constraints control subsystem control subsystem: contains definitions of control constraints

slide-12
SLIDE 12

Cost Subsystem - House Construction Workflow

Template: generic procedure for computing costs over schedules cost_constraint(ω,asg) = value_constraint(cost(ω,asg)) cost(ω1•pω2 ,asg) = op⊗(cost(ω1,asg),cost(ω2,asg)) cost(ω1||pω2 ,asg) = op|(cost(ω1,asg),cost(ω2,asg)) Problem-specific part for the constraint: "construction should not exceed the given duration” cost(ω,asg) = cost_of(asg(ω)) value_constraint(V) = V < c

  • p|(V1,V2)= max(V1,V2)
  • p⊗(V1,V2)= V1+V2

Cost of path ω Schema for computing costs

  • ver composite schedules
slide-13
SLIDE 13

Control Subsystem - House Construction Workflow

Template: generic procedure for computing control constraints ctrl_constraint(ω1•pω2,asg) = set_constraint⊗(asg(ω1),asg(ω2)), ctrl_constraint(ω1,asg), ctrl_constraint(ω2,asg) ctrl_constraint(ω1 || pω2,asg) = set_constraint|(asg(ω1),asg(ω2)), ctrl_constraint(ω1,asg), ctrl_constraint(ω2,asg) ctrl_constraint(ω,asg) = leaf_constraint(asg(ω)) Problem specific part for the constraint: "Different subcontractors must be chosen for parallel tasks” set_constraint| (R1,R2) = (token_of(R1) ∩ token_of(R2) =∅ )

Satisfy constraints on sequential sequential combo of part.sched Satisfy constraints on parallel parallel combo of p.sched Satisfy constraints

  • n each

each p.sched p.sched separately separately Satisfy constraints

  • n each

each p.sched p.sched separately separately

slide-14
SLIDE 14

Logical Entailment in Constraint System

M, ζ, ω, asg ¦ ϕ iff M, ω ¦ ϕ, Ð ¦ cost_constraint( ω, asg) and Ð ¦ ctrl_constraint( ω, asg)

Constraint system Partial schedule m-path structure Resource assignment CCTR formula Constraint universe

slide-15
SLIDE 15

Using CCTR as a Workflow Scheduler

Take a CCTR workflow which includes constraints Construct an equivalent CTR workflow so that:

There is a 1-1 correspondence between the partial schedules of the CCTR workflow and the resulting CTR workflow These partial schedules & resource assignments for them are computed by the proof theory of CTR

Can now schedule conjunction-free workflows using CTR interpreter Can take advantage of prior work on scheduling workflows under causality/temporal constraints

slide-16
SLIDE 16

Transformation Rules

B(G1 ∨ G2) = B(G1) ∨ B(G2) B(G) = R(G,T)⊗ cost_constraint(T)⊗ ctrl_constraint(T) R(A,T) = A⊗ (T=resource_asg(A,Agents)) R(G1 | G2, T) = (T='|'(T1,T2))⊗ (R(G1,T1) | R(G1,T2)) R(G1⊗G2, T) = (T='⊗'(T1,T2))⊗ (R(G1,T1) | R(G1,T2)) R(G1∨ G2, T) = R(G1,T) ∨ R(G2,T) basically structural induction with insertion of constraints in appropriate places

slide-17
SLIDE 17

Transformation for Part of House Construction Example

T='|'(T1,T2)⊗ ((T1= '⊗' (T3,T4)⊗ (((c c ⊗T3=rsrc(c,W)) ⊗ (r r ⊗ T4=rsrc(r,X)))) | (T2='|'(T5,T6)⊗ (((i i ⊗ T5=rsrc(i,Y)) | (e e ⊗ T6 = rsrc(e,Z))))) ⊗ cost_constraint(T) ⊗ ctrl_constraint(T)

((carpentry ⊗ roof) | (installation | ceiling)) ∧ cost_constraint ∧ ctrl_constraint

slide-18
SLIDE 18

Constraint Template – Cost Constraints

Template: cost_constraint(T) :- cost(T,V), value_constraint(V) cost((T1,T2),V) :- cost(T1,V1), cost(T2,V2), op|(V1,V2,V) cost(⊗(T1,T2),V) :- cost(T1,V1), cost(T2,V2), op⊗(V1,V2,V) cost(resource_asg(T,Agents),V):- cost_of(resource_asg(T,Agents),V) User-defined terms and predicates: resource_asg(T, A) := rsrc(T,A) cost_of(rsrc(T,A),V) :- duration(T,A,V) value_constraint(V) :- V <c

  • p|(V1,V2,V) :- V = max(V1,V2 )
  • p⊗(V1,V2,V) :- V = V1+V2
  • Logic rules that mimic the definition of the cost part of a constraint system

Ensures that duration is within constraints

slide-19
SLIDE 19

Constraint Template-Control Constraints

Template: ctrl_constraint(|(T1,T2)) :- set_constraint|(T1,T2), ctrl_constraint(T1), ctrl_constraint(T2) ctrl_constraint(⊗(T1,T2)) :- set_constraint⊗(T1,T2), ctrl_constraint(T1), ctrl_constraint(T2) ctrl_constraint(T) :- leaf(T), leaf_constraint(T) User-defined predicates: set_constraint|(T1,T2):- disjoint(T1,T2) set_constraint⊗(T1,T2) :- true leaf_constraint(T) :- true

  • Same for the control part of a constraint system

Ensures that resources are not shared on parallel paths

slide-20
SLIDE 20

Correctness of the Transformation

Theorem: Let ζ be a constraint system and Ð be a constraint domain, which can be represented using the template rules. Then, the transformation B is a correct prescheduler (I.e., B yields equivalent workflows that satisfy constraints)

slide-21
SLIDE 21

The Big Picture

G Workflow G’=B(G) Const. set

  • Const. def.

Transfornation Rules CTR Interpreter Constraint Solver Resource assignment Rsrc asg term schedule

slide-22
SLIDE 22

Conclusion

Presented a logical framework for modelling and scheduling workflows under resource allocation constraints (implemented using a CTR interpreter and XSB) This framework can be extended with special- purpose constraint solvers optimised for our framework Scheduling under resource allocation constraints for dynamically changing workflows and for multiple concurrent instances of the same workflow are topics for future work