Task Scheduling in Grid
Computing
Team Coda
Hardik Navin Nagda
hnn8556@rit.edu
Divin Jagdish Visariya
djv9999@rit.edu
Team Members
Agenda
• Task Scheduling in Grid Computing
• Min-Min Algorithm and Max-Min Algorithm
• Hypothesis
• Our Simulation Idea
• Design of our code
• Code structure explanation
• Demo
Task Scheduling in Grid Computing
• Grid is globally distributed and consists of
heterogeneous, loosely coupled data and resources
• Grid changes the resources quite frequently and the
systems are heterogeneous in nature
• Task scheduling challenge is to find the best or
optimal resources in order to minimize the tasks
computation time
Min-Min Algorithm
• Static Task Scheduling Algorithm
• Tasks are scheduled based on minimum completion time
• Example : Expected Completion Time
M1 M2 M3
Task 1 3 6 7
Task 2 4 12 8
Task 3 6 20 18
Min-Min Algorithm
M1 M2 M3
Task 1 3 6 7
Task 2 4 12 8
Task 3 6 20 18
Step 1 :
Step 2 :
Min-Min Algorithm
M1 M2 M3
Task 2 4 + 3 12 8
Task 3 6 + 3 20 18
Min-Min Algorithm
M1 M2 M3
Task 3 9 + 4 20 18
Step 3 :
Min-Min algorithm
Image Taken from Paper : An Improved Scheduling Algorithm for Grid Tasks
Image Taken from Paper : An Improved Scheduling Algorithm for Grid Tasks
Max-Min Algorithm
• Static Task Scheduling Algorithm
• Two Phases
• First Phase : Set of all minimum expected completion time are
found for every task and resource
• Second phase : Task with the maximum value within the above
set is selected for execution
• Example : Expected Completion Time
M1 M2 M3
Task 1 3 6 7
Task 2 4 12 8
Task 3 6 20 18
Max-Min Algorithm
M1 M2 M3
Task 1 3 6 7
Task 2 4 12 8
Task 3 6 20 18
Step 1 :
Max-Min Algorithm
M1 M2 M3
Task 1 3 + 6 6 7
Task 2 4 + 6 12 8
Step 2 :
Max-Min Algorithm
M1 M2 M3
Task 1 9 6 7
Task 2 10 12 8
Step 3 :
Max-Min Algorithm
M1 M2 M3
Task 1 9 6 7 + 8
Step 4 :
Max-Min Algorithm
Image Taken from Paper : An Improved Scheduling Algorithm for Grid Tasks
Min-Min v/s Max-Min Algorithm
• If there are many lighter tasks, Max-Min
algorithm is better than Min-Min in terms of
makespan and resource utilization
• If there are many heavier tasks, Min-Min
algorithm is better than Max-Min
Hypothesis
• Grid scheduling using Min-Min algorithm gives lower
makespan as compared to the Max-Min algorithm if
there are more heavy computational jobs
• Likewise, Max-Min Algorithm gives lower makespan
as compared to Min-Min Algorithm if there are
more lighter jobs
• Makespan means the entire completion time for
the fix number of jobs
Simulation Idea
Design of Min-Min Algorithm
• T = {T1, T2 … Tm} : The Set of Tasks
• R = {R1, R2 … Rn} : The Set of Resources
• Expected Execution Time Table
• The m x n matrix which contains the time taken by the
task to complete execution for given resource
• Expected Completion Time Table
• The m x n matrix which contains the time taken by the
task to complete execution for given resource + waiting
time of the task for obtaining the desired resource
• Running Time for Resources
• The total time taken by resource to execute all task
assigned
Design of Min-Min Algorithm
• Simulate Task
• Task id is generated randomly and its added to the set
• Arrival time of the task is recorded
• Scheduler Algorithm is invoked accordingly
• Removes the task from the set after it is served
• Min-Min Scheduler
• Computes the Expected Execution Time :
• Expected Execution Time = Size of task (MI) / CPU processing
power (MIPS)
• Computes the Expected Completion Time :
• Expected Completion Time = Expected Execution Time
+ Resource Running Time - Task Arrival Time
Design of Min-Min Algorithm (Cont..)
• Min-Min Scheduler Continued
• Contacts Resource Monitor to check if any resource is idle
• If yes, then finds the task with the minimum Expected
Completion Time and also the resource for that task
• Assigns the task to the resource and change the resource
status to “Running”
• Adds the Execution Time of the resource to the resource
Waiting Time and updates resource Running Time
• Also updates Expected Completion Time based on the
resource Waiting Time
• After serving the task the resource again follows the same
procedure until all task are served
Design of Min-Min Algorithm (Cont..)
• Resource Monitor
• Maintains the status of all the resources after every
task is being served or resource being idle
T1
Set of Tasks
Resources
T1
Set of Tasks
Resources
T2
T1
Set of Tasks
Resources
T1
T2
Set of Tasks
Resources
T1
T2
T3
Set of Tasks
Resources
T1
T2
T3T4
Set of Tasks
Resources
T1
T2
T3T4T5
Set of Tasks
Resources
T4
T2
T5 T3
Set of Tasks
Resources
Task
Resource
Simulate
Demo
MakeSpan Calculation
Progress made so far
• Prepared the design of the system for simulation
• Written the code to simulate the Min-Min algorithm
• To be Done:
• Implement Max-Min algorithm
• Perform experiments for different cases
• Evaluate the makespan calculation and check the
results
• Prove or Disprove our hypothesis
Questions ?
THANK YOU

Task Scheduling in Grid Computing.

  • 1.
    Task Scheduling inGrid Computing Team Coda
  • 2.
  • 3.
    Agenda • Task Schedulingin Grid Computing • Min-Min Algorithm and Max-Min Algorithm • Hypothesis • Our Simulation Idea • Design of our code • Code structure explanation • Demo
  • 4.
    Task Scheduling inGrid Computing • Grid is globally distributed and consists of heterogeneous, loosely coupled data and resources • Grid changes the resources quite frequently and the systems are heterogeneous in nature • Task scheduling challenge is to find the best or optimal resources in order to minimize the tasks computation time
  • 5.
    Min-Min Algorithm • StaticTask Scheduling Algorithm • Tasks are scheduled based on minimum completion time • Example : Expected Completion Time M1 M2 M3 Task 1 3 6 7 Task 2 4 12 8 Task 3 6 20 18
  • 6.
    Min-Min Algorithm M1 M2M3 Task 1 3 6 7 Task 2 4 12 8 Task 3 6 20 18 Step 1 :
  • 7.
    Step 2 : Min-MinAlgorithm M1 M2 M3 Task 2 4 + 3 12 8 Task 3 6 + 3 20 18
  • 8.
    Min-Min Algorithm M1 M2M3 Task 3 9 + 4 20 18 Step 3 :
  • 9.
    Min-Min algorithm Image Takenfrom Paper : An Improved Scheduling Algorithm for Grid Tasks Image Taken from Paper : An Improved Scheduling Algorithm for Grid Tasks
  • 10.
    Max-Min Algorithm • StaticTask Scheduling Algorithm • Two Phases • First Phase : Set of all minimum expected completion time are found for every task and resource • Second phase : Task with the maximum value within the above set is selected for execution • Example : Expected Completion Time M1 M2 M3 Task 1 3 6 7 Task 2 4 12 8 Task 3 6 20 18
  • 11.
    Max-Min Algorithm M1 M2M3 Task 1 3 6 7 Task 2 4 12 8 Task 3 6 20 18 Step 1 :
  • 12.
    Max-Min Algorithm M1 M2M3 Task 1 3 + 6 6 7 Task 2 4 + 6 12 8 Step 2 :
  • 13.
    Max-Min Algorithm M1 M2M3 Task 1 9 6 7 Task 2 10 12 8 Step 3 :
  • 14.
    Max-Min Algorithm M1 M2M3 Task 1 9 6 7 + 8 Step 4 :
  • 15.
    Max-Min Algorithm Image Takenfrom Paper : An Improved Scheduling Algorithm for Grid Tasks
  • 16.
    Min-Min v/s Max-MinAlgorithm • If there are many lighter tasks, Max-Min algorithm is better than Min-Min in terms of makespan and resource utilization • If there are many heavier tasks, Min-Min algorithm is better than Max-Min
  • 17.
    Hypothesis • Grid schedulingusing Min-Min algorithm gives lower makespan as compared to the Max-Min algorithm if there are more heavy computational jobs • Likewise, Max-Min Algorithm gives lower makespan as compared to Min-Min Algorithm if there are more lighter jobs • Makespan means the entire completion time for the fix number of jobs
  • 18.
  • 19.
    Design of Min-MinAlgorithm • T = {T1, T2 … Tm} : The Set of Tasks • R = {R1, R2 … Rn} : The Set of Resources • Expected Execution Time Table • The m x n matrix which contains the time taken by the task to complete execution for given resource • Expected Completion Time Table • The m x n matrix which contains the time taken by the task to complete execution for given resource + waiting time of the task for obtaining the desired resource • Running Time for Resources • The total time taken by resource to execute all task assigned
  • 20.
    Design of Min-MinAlgorithm • Simulate Task • Task id is generated randomly and its added to the set • Arrival time of the task is recorded • Scheduler Algorithm is invoked accordingly • Removes the task from the set after it is served • Min-Min Scheduler • Computes the Expected Execution Time : • Expected Execution Time = Size of task (MI) / CPU processing power (MIPS) • Computes the Expected Completion Time : • Expected Completion Time = Expected Execution Time + Resource Running Time - Task Arrival Time
  • 21.
    Design of Min-MinAlgorithm (Cont..) • Min-Min Scheduler Continued • Contacts Resource Monitor to check if any resource is idle • If yes, then finds the task with the minimum Expected Completion Time and also the resource for that task • Assigns the task to the resource and change the resource status to “Running” • Adds the Execution Time of the resource to the resource Waiting Time and updates resource Running Time • Also updates Expected Completion Time based on the resource Waiting Time • After serving the task the resource again follows the same procedure until all task are served
  • 22.
    Design of Min-MinAlgorithm (Cont..) • Resource Monitor • Maintains the status of all the resources after every task is being served or resource being idle
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
    T4 T2 T5 T3 Set ofTasks Resources
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
    Progress made sofar • Prepared the design of the system for simulation • Written the code to simulate the Min-Min algorithm • To be Done: • Implement Max-Min algorithm • Perform experiments for different cases • Evaluate the makespan calculation and check the results • Prove or Disprove our hypothesis
  • 37.