**3.2 InteGrade application scheduling**

8 Will-be-set-by-IN-TECH

A scheduling algorithm determines how the applications should be distributed for execution and how resources should be used, according to the system performance goals and the provided information. However, task mapping to a set of heterogeneous resources is a well

Scheduling algorithms can be grouped into two modes: batch and on-line (Maheswaran et al., 1999). In the on-line scheduling mode, a task is mapped to a machine as soon as it arrives to the scheduler. In the batch mode, tasks are not mapped as they arrive. Instead, they are placed inside a data structure called a meta-task and are mapped only in predefined interval times, called mapping events. In this way, batch algorithms can compare the task's resource

Dong and Akl (Dong & Akl, 2006) describe scheduling algorithms commonly used in grid

**Work Queue (WQ)** is an on-line algorithm that assigns each task to the next machine that becomes available. If multiple machines become available simultaneously, one is randomly chosen. This algorithm maps only one task to a single resource. WQ does not use any specific information regarding the application or the grid resources and is particularly useful for systems where the main objective is to maximize the resources usage, instead of minimizing the execution time of individual tasks. Depending on the implementation, this algorithm may need to check the status of all *m* grid resources to find out which machines are available. Thus, the scheduling complexity of this algorithm is *O*(*m*). An extension of this algorithm, called WQR, uses a replication mechanism. This variant is used by the OurGrid middleware 4.

**Minimum Conclusion Time (MCT)** is an on-line heuristic that assigns each task to the machine with the shorter expected completion time to accomplish it. The completion time corresponds to the sum of the time necessary for the machine to become available (in case it is already running another tasks) plus the time that it will take in order to execute the task. This algorithm can map more than one task per resource. The mapping complexity is *O*(*m*), since as a task arrives, all grid machines are examined for determining the one having the shortest

**Min-min** is a batch heuristic based on MCT. This algorithm takes as input parameters a set of unmapped tasks *M* (meta-task) and a set of grid machines *R*. At its first step, the algorithm computes the completion time of each task in *M* for every machine in *R*. Next, the algorithm searches for the lowest completion time for each task. Min-min then selects the task with the minimum completion time among all tasks in *M* and assigns it to the machine in which this performance is expected to be obtained. The mapped task is removed from the meta-task *M*, and the algorithm increments the expected available time of the chosen grid resource considering the time to run the newly mapped task. This process is repeated until there are no more tasks left to be scheduled. As MCT, min-min also maps more than one task per node. Being *m* the number of tasks in *M* and *r* the amount of resources contained in *R*, computing the completion time of each task in all machines will take *O*(*mr*). The loop is repeated *m* times,

known NP-complete problem (El-Rewini et al., 1994; Ibarra & Kim, 1977).

computing environments, among which we highlight the following:

**3.1 Grid scheduling algorithms**

requirements for performing better mappings.

expected conclusion time for its execution.

leading to a total cost of *O*(*m*2*r*).

<sup>4</sup> http://www.ourgrid.org

The InteGrade scheduling algorithm (Goldchleger et al., 2004) follows an on-line approach. It uses a filter to select resources based on constraints and preferences provided by users during the process of submitting applications. Constraints define minimum requirements for the selection of machines, such as hardware and software platforms, resource requirements such as minimum memory requirements. Preferences define the order used for choosing the resources, like rather executing on a faster CPU than on a slower one. The tasks that make up an application are then mapped to the nodes according to the ordered list of resources. If requirements and preferences are not specified, the algorithm maps the tasks to random chosen grid resources. The algorithm can map more than one task per node.
