Download presentation
Presentation is loading. Please wait.
Published byCarmel Dixon Modified over 9 years ago
1
A Scheduling Service Oriented Approach for Workflow Scheduling by Conan Fan Li Supervisor: Dr. Wendy MacCaull Committee member:Dr. Man Lin Committee member:Dr. Iker Gondra
2
Outline Background The SSO approach Results and conclusion
3
Background What is a workflow? A model to represent real work for further assessment. It is composed of a number of tasks which are connected in the form of a directed graph.
4
Background
6
Why workflow? Abstraction Visualization Automation
7
Background What is scheduling? The process of making decisions about the allocation of resources for a number of tasks to achieve one or more objectives. When do we need scheduling?
8
Background Manufacturing (e.g., a car factory)
9
Background Service industry (e.g., Gate Assignments at an Airport)
10
Definitions A schedule has unforced idleness if some machines idle when there are jobs waiting for processing. A schedule is non-delay if unforced idleness is prohibited. Examples of possible objective functions to be minimized are: Makespan: completion time of the last job to leave the system. Maximum lateness: the worst violation of the due dates. Total weighted completion time: the sum of the weighted completion times of the n jobs. ... A multi-instance task is a task that may have multiple distinct execution instances running concurrently within the same workflow case.
11
Definitions We say a job is waiting when it is not assigned to any machine or finished. We say a job is independent when it does not have a precedence constraint or the precedence constraint is satisfied (i.e., the preceding job is finished). We say a job is machine-ready when its required machine is free. We say a job is enabled when it is waiting, independent and machine-ready.
12
Definitions Schedule-flow is a framework that has a predisposition to model scheduling processes in workflow. Schedule- flow patterns are an extension to the workflow language formalism - Workflow Patterns. By assembling and modifying the existing workflow patterns, schedule-flow introduces new patterns that carries particular responsibilities and services in scheduling systems.
13
Definitions Schedule-flow is a framework that has a predisposition to model scheduling processes in workflow. It is an extension to the workflow language formalism - Workflow Patterns. By assembling and modifying the existing workflow patterns, schedule-flow introduces new patterns that carries particular responsibilities and services in scheduling systems. A* search uses a distance-plus-cost evaluation function (f(x)) to determine the order in which the search visits nodes in the fringe. The distance-plus-cost heuristic is a sum of two functions: the cost function, which is the cost from the starting node to the current node (usually denoted g(x)) and an "heuristic estimate" of the distance to the goal (h(x)).
14
Definitions We say an event e=(m,j,start,end) is a future event of schedule S if e.start >= S.clock
15
Relation Scheduling is a ___ and a workflow is to represent a ___. Why use workflow to model scheduling? Workflow is concise, comprehensive and high-level Scheduling is diverse, technical and low-level We want to visualize the scheduling process Workflow has a wider range of audience than scheduling does. That is why we need to bridge them.
16
Attempt Case: a simple job shop scheduling problem Objective: minimize makespan(C max )makespan(C max )
17
Attempt 1.Messy What you see is messy What you do not see is messier
18
Attempt
19
We may choose Job0 to process first. Why does this seem like a smart choice? 2. multi-instance tasks are confusing and high- maintenancemulti-instance 3. Need to incorporate smart choices
20
Attempt Finish Job0 Clock+=7 Job0.waiting=False
21
Attempt We want to assign as many jobs as possible before processing 4. Options for unforced idleness unforced idleness
22
Attempt We may choose Job4 to process
23
Attempt Finish job1 Clock=7+9=16 Job1.waiting=False (Note, job4 has been processed for 9 time units)
24
Attempt No other jobs are available to process except Job4
25
Attempt Finish Job4 Clock=16+(15-9)=22 Job4.waiting=False
26
Attempt Assign job2
27
Attempt … we get this: (57, {,,,,, }) An event: clock attribute of a schedule
28
Attempt … we get this: (57, {,,,,, }) Gantt chart Forced idleness
29
Problems The size issue The size of the resulting workflow grows in accordance to the size of the problem (number of jobs and number of machines). There are also too many variables to configure inside the workflow. This is neither concise or comprehensive. The complication of multi-instance tasks Users may not understand when to use them The lack of heuristic incorporation When several jobs are presented to a machine, there should be a mechanism to decide which one appears to be the best option
30
Problems The lack of options for unforced idleness There should be an easy way of expressing that we do not want to allow unforced idleness, that is, when a machine is free, we always try to assign a job to it if possible. The lack of comparison and sorting We do not want the workflow to stop as soon as it finds one feasible schedule. Instead, we need it to compare all the schedules and present the best one. There should be a mechanism to easily compare and sort the schedules.
31
Proposal The current workflow components are clearly not sufficient for constructing sophisticated schedulers. Therefore, we need a set of new workflow patterns to provide the services we need in scheduling. We call the extension schedule-flow patterns.schedule-flow
32
Schedule-flow Present the data (jobs and machines) in a single file instead of mapping each one of them to a task in the workflow. This way, the size of the workflow will not be proportional to the size of the scheduling problem. More importantly, the same workflow can now work with different sets of data. Eliminate the usage of multi-instance tasks. Instead, we use a data structure called “fringe”(a collection of ideas, see A*) which is implemented as a priority queue. Different execution instances (schedules) will be evaluated first and then pushed into the fringe.A* Heuristics may be given by users regarding the preference of assignment. For example, we may want to assign the jobs with the least processing times first (SPT).
33
Schedule-flow By default, we do not allow unforced idleness. We would like to keep the machines as busy as possible. “For many the models that have regular objective functions, there are optimal schedules that are non-delay” The fringe provides options for its priority rule, which is the order that the schedules are sorted.
34
Schedule-flow For the same problem, use schedule-flow: Built-in variables: fringe, current
35
Schedule-flow task components Creation Does nothing Pop current=fringe.pop() Selection By default, select jobs that are enabled (or independent, machine- ready…)enabled Allocation Generate schedules by assigning jobs to corresponding machines Process Generate one schedule by advancing time until any job is finished Push fringe.push(schedules)
36
Schedule-flow condition components Exist Tests if the input exists Continue By default, tests if the fringe is empty. Other options may be used such as limiting the execution time or the number of schedules generated…
37
Use Schedule-flow in practice Design a schedule-flow with a graphic editor We used YAWL in this case.
38
Use Schedule-flow in practice Provide the files Job file (e.g., “jobs.csv”) Machine file Schedule-flow XML file generate by the graphic editor Parse the schedule-flow file and detect schedule-flow components by matching names. We used a Python script to parse the YAWL’s XML file. POP
39
Use Schedule-flow in practice Configure the components, objective and heuristic In this case, every component uses the default setting Objective is set to minimize the makespan. Therefore, the cost function g(S)=S.clock Heuristic is initially 0 (f(x)=g(x), see A*). For this case, we set the heuristic function to return the processing time of the future event (see future event) with the earliest end timeA*future event Bind: automatically connect the components according the schedule-flow Run the schedule-flow
40
Schedule-flow simulation ChangesValues fringe = [S0] S0 is the initial schedule where no jobs are assigned. S0={ }
41
Schedule-flow simulation ChangesValues current=fringe.pop()current=S0 fringe=[]
42
Schedule-flow simulation ChangesValues SELECT.output=[0,2,4]current=S0 fringe=[] SELECT.output=[0,2,4]
43
Schedule-flow simulation ChangesValues EXIST returns Truecurrent=S0 fringe=[] SELECT.output=[0,2,4]
44
Schedule-flow simulation ChangesValues ALLOCATE.output={S1,S2,S3}current=S0 fringe=[] S1: (0,{ }) S2:(0,{ }) S3:(0,{ })
45
Schedule-flow simulation ChangesValues fringe.push(ALLOCATE.output)current=S0 fringe=[S1,S3,S2] f(S1)=0+7=7 f(S3)=0+15 f(S2)=0+21 S1: (0,{ }) S3:(0,{ }) S2:(0,{ })
46
Schedule-flow simulation ChangesValues CONTINUE returns Truecurrent=S0 fringe=[S1,S3,S2]
47
Schedule-flow simulation ChangesValues current=fringe.pop()current=S1=(0,{ }) fringe=[S3,S2]
48
Schedule-flow simulation ChangesValues SELECT.output=[]current=S1=(0,{ }) fringe=[S3,S2] SELECT.output=[] No jobs are enabled in S1!
49
Schedule-flow simulation ChangesValues EXIST returns Falsecurrent=S1=(0,{ }) PROCESS.output=S4=(7,{ })fringe=[S3,S2]
50
Schedule-flow simulation ChangesValues fringe.push(S4)current=S1=(0,{ }) fringe=[S4,S3,S2] f(S4)=7+0 f(S3)=15 f(S2)=21 S4: (7,{ }) S3:(0,{ }) S2:(0,{ })
51
Schedule-flow simulation ChangesValues CONTINUE returns Truecurrent=S1=(0,{ }) fringe=[S4,S3,S2]
52
Schedule-flow simulation Many more iterations… … we get this: (57, {,,,,, }) Gantt chart
53
FAQ Why is schedule-flow a framework? Like many other frameworks (e.g., openGL, Joomla...), schedule-flow is “an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software. It is a collection of software libraries providing a defined application programming interface (API)”. How to use schedule-flow with a particular workflow language (e.g., NOVA workflow). The translation between workflow languages and schedule-flow should be left to the applications. The translation could be as simple as extracting the names and dependencies of the tasks in the workflow like what we did with YAWL. However, for a more sophisticated and user-friendly software, advanced configurations such as heuristic function may be also incorporated into the workflow graphic editor to provide better user experience.
54
FAQ Why do we need to use workflow to model schedulers anyway? To be concise, comprehensive and visual. If we can see each step in the scheduling process, it is easier to optimize and make changes. What problems does schedule-flow solve? By cutting the direct mapping between jobs and workflow tasks, schedule-flow provides more flexibility so that the same structure can be used for more than just one problem. Moreover the size of the resulting workflow is significantly reduced. By introducing the concepts of heuristics, schedule-flow makes “smart” choices instead of random permutation for job assignments.
55
Tool: PYSF We developed a tool called PYSF (Python schedule-flow) for experiments Demo…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.