scheduling parallel task by: atena daneshmandi. outline introduction typology of parallel tasks ...

15
Scheduling Parallel Task By: Atena Daneshmandi

Upload: melvin-robbins

Post on 23-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Scheduling Parallel Task

By:

Atena Daneshmandi

Page 2: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Outline

Introduction

Typology of Parallel Tasks

Task Graphs

A Deterministic module

A Deterministic module by Gantt Chart

C# Example(Three Tasks in Parallel)

Complexity of scheduling Parallel Task

Conclusion

References

Page 3: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

IntroductionThe idea behind parallel tasks (PTs)is to consider an alternative for dealing with communications, especially in the case of large delays.

A PT is a task that gathers elementary operations, typically a numerical routine or a nested loop, which contains itself enough parallelism to be executed by more than one processor.

A parallel task is a collection of tasks, some of which must be completed before than others begin. The precedence relationships between tasks are commonly defined in a directed acyclic graph known as the task graph .

Page 4: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Typology of Parallel Tasks

There exist several versions of PTs depending on their execution on a parallel and distributed system:

1. Rigid when the number of processors to execute the PT is fixed a priori. This number can either be a power of 2 or any integer number. In this case, the PT can be represented as a rectangle in a Gantt chart.

2. Moldable when the number of processors to execute the PT is not fixed but determined before the execution. As in the previous case this number does not change until the completion of the PT.

3. In the most general case, the number of processors may change during the execution. In this case, the PTs are flexible.

Page 5: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Task Graphs

A group of tasks that can be executed in parallel

Vertex(task node)

Edge(task link)

There are two main ways to build a task graph of PTs:

1. The user has a relatively good knowledge of its application and is able to provide the graph (top–down approach),

2. The graph is built automatically from a larger graph of sequential tasks generated at runtime (down–top).

Page 6: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

A Deterministic module

In a deterministic model, the execution time for each task and the precedence relations between them are known in advance. This information is depicted in a directed graph, usually known as the task graph.

Page 7: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

A Deterministic module

Below we have seven tasks with the corresponding duration and their precedence relations

Even if the task graph is a simplified representation of a parallel program execution, it provides a base for static allocation of processors.

Page 8: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

A Deterministic module by Gantt Chart

A schedule is an allocation of tasks to processors which can be shown by a Gantt chart.

In a Gantt chart, the initiation and ending times for each task running on the available processors are shown and the makespan (total execution time of the parallel program) of the schedule can be easily resultant.

The Gantt chart in an example, resulted of applying the list scheduling algorithm to the task graph, with the priority list

L = [T1, T2, T3, T4, T5, T6, T7].

Page 9: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

A Deterministic module by Gantt Chart

Below shows a Gantt chart corresponding to one possible schedule of the parallel tasks of the task graph of example onto three processors.

By simple observation we notice a makespan of 9.

As we can see some simple scheduling problems can be solved to optimality in polynomial time while others can be computationally inflexible.

Page 10: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

C# Example(Three Tasks in Parallel)

Page 11: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Complexity of scheduling Parallel Task

One of the assumptions made in classical scheduling theory is that a task is always executed by one processor at a time. With the advances in parallel algorithms, this assumption may not be valid for future task systems.

The complexity of scheduling Parallel Task Systems to minimize the schedule length is examined.

Page 12: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Complexity of scheduling Parallel Task

For no preemptive scheduling, it is shown that the problem is strongly NP-hard even for two processors when the precedence constraints consist of a set of chains.

For preemptive scheduling, it is shown that the problem is strongly NP-hard for arbitrary number of processors for a set of independent tasks.

Over all it is shown that it is NP-hard.

Page 13: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Conclusion

The allocation of a number of parallel tasks in parallel supporting environments, multiprocessors or multicomputer, is a difficult and important issue in computer systems

As we are interested in scheduling of several tasks graphs onto a reasonable number of processors, in many cases we would be content with polynomial time scheduling algorithms that provide good solutions.

Page 14: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

References

OpenMP, http://openmp.org

A. Khemka and R. K. Shyamasundar, “An optimal multiprocessor real-time scheduling algorithm,” J. Parallel Distrib.

Page 15: Scheduling Parallel Task By: Atena Daneshmandi. Outline  Introduction  Typology of Parallel Tasks  Task Graphs  A Deterministic module  A Deterministic

Question?