**7. RA Algorithms**

In this section ATSRA algorithms are described which enable RA to assign resources to Ti within the resource pool, Ґi, allocated to it by TRPS. ATSRA algorithms are based on Linear Programming which is a popular technique for solving optimization problems [12][13]. It models an optimization problem as a set of linear expressions composed of input parameters and output parameters. The LP solver starts by creating a problem instance of the model by assigning values to the input parameters[16][17]. The problem instance is then subjected to an objective function, which is also required to be a linear expression. The values of the output variables, which collectively represent the optimal solution, are determined for the best value of the objective function. Based on this approach three algorithms are presented in this section which can be deployed at RA. Each of the ATSRA algorithms has the following two stages.

**Stage-1:** Selection of the most appropriate Architectural Template, ATi for Ti.

**Stage-2:** Allocation of the resources for ATi (if not done in stage 1.)


$$\text{cost}\_{\text{2-Ter-a}} = \text{L}\left\{ \sum\_{l=1}^{k} \xi d(n\_{\text{src}}, n\_{\text{slink}\_l}) + \text{Cp}\_{\text{src}} \right\} \tag{3}$$

$$\mathbf{L}\cos\mathbf{t}\_{2\cdot\mathbf{T}\mathbf{r}\cdot\mathbf{b}}=\mathbf{L}\{\sum\_{l=1}^{\mathbf{k}}\{\mathbf{d}(\mathbf{n}\_{\mathbf{S}\mathbf{r}\mathbf{C}},\sin\mathbf{k}\_{\mathbf{k}})+\xi\mathbf{C}\mathbf{p}\_{\mathrm{Sink}\_{\mathbf{t}}}\}\}\tag{4}$$

$$\begin{aligned} \text{cost}\_{\text{4-iier}} &= \min \text{L} \begin{bmatrix} \sum\_{j=1}^{n} \frac{1}{p} \{Cp\_{j} + d\{n\_{\text{src}}, n\_{l}\} + \varepsilon d\{n\_{l}, n\_{\text{greess}}\}\} \mathbf{x}\_{l} \\ + \varepsilon \sum\_{l=1}^{n} d\{n\_{\text{greess}}, n\_{l}\} \mathbf{y}\_{l} + \varepsilon \sum\_{l=1}^{n} \sum\_{j=1}^{k} d\left(n\_{l}, \mathbf{n}\_{\text{sink}\_{l}}\right) \mathbf{w}\_{lj} \end{bmatrix} \end{aligned} \tag{5}$$


$$\text{Let } \ C p\_l^\sim = C p\_l + d(n\_{src}, n\_l) + \varepsilon d(n\_l, n\_{eares}) \tag{6}$$

Resource Management for Data Intensive Tasks on Grids 63

The ATSRASSR starts by calculating the costs associated with 2- tier Architectural Templates 2a and 2b, using Equations (3) and (4). The minimum of these two is called as costmin. For 4 tier Architectural Templates, instead of calculating exact cost4-tier, cost4-tier-relaxed is calculated.

In ATSRABSR algorithm we apply relaxation of the constraints at both Architectural

For constraint relaxation, the fifth constraint (i.e. ��� ≤ ��) is dropped.

*7 choose Architectural Template associated with costmin*

resultant solution matrix is used for resources allocation as well.

The decrease in algorithm running time is the benefit of using this relaxation

for actual resource allocation*.* For relaxation, constraints 3 and 4 are replaced by

*8 Allocate resources for Architectural Template associated with costmin* 

The important thing to note is that in ATSRABSR, the constraint relaxation technique is used at both the Architectural Template selection stage and the relaxed solution matrix is used

Note that the constraint relaxed in ATSRASSR produces an invalid solution matrix. By dropping fifth constraint (i.e. ��� ≤ �� ), the variable wij can be assigned a non-zero value even if the corresponding data-farm node yi is not assigned. Thus the resultant solution matrix cannot be used in resource allocation. But in ATSRASSR, we are using this relaxation only for the selection of Architectural Template and if 4-tier is chosen then the exact LP formulation is used for actual resource allocation. For ATSRABSR, we have chosen such constraints for relaxation that do not produce an invalid solution matrix. Thus the same

Note that as we move from ATSRAorg to ATSRASSR and then to ATSRABSR, following are

Template Selection and resource allocation stages.

Summary of ATSRABSR algorithm

*2 calculate cost*2-Tier-a *and cost*2-Tier-b *3 costmin = min(cost2-Tier-a, cost2-Tier-b)* 

*4 calcuate cost4-Tier-relaxed 5 If cost4-Tier-relaxed < costmin 6 costmin=cost4-tier-relaxed*

A summary of ATSRABSR is as follows:

*1 initialize* 

 3 �

 4 �

 � ≤ �� ≤ 1

 � ≤ �� ≤ 1 

some of the considerations.

**8. Results experimental** 

1. Time complexity of algorithm is reduced. 2. Imprecision in Resource Allocation increases.

This paper uses the following performance metrics.

**7.3 ATSRABSR algorithm** 

xi, yi ���������� � ��to n wij �������������� � ��to n, j=1 to k

It is important to note that there is nothing that prevents a node to be part of both computefarm and data-farm. For example if the solution matrix has x3=1 and y3=1 and then n3 is used both in data-farms and compute-farms. Once the costs calculated with all the Architectural Templates are calculated, the minimum of them is chosen. If costmin= cost4-tier , then resources are allocated according the values of the variables in solution matrix.
