**Algorithm 3.2. Choose LCC method for parallel cache mode task.**

1. Get the resource demand vector RDV (w1, w2, w3, w4) of T;

mine= ;

2. While *LCCS*≠do

{ Get *S*∈*LCCS* ; /\* *S* is a logical computer cluster \*/

Calculate total resource vector (*arCpu*, *armem*, *ardisk*, *arnet*) of all cache nodes of *S*, it is as follows:

$$\{ar\_{\text{C:pu}} = \sum\_{\text{CN in S}} \text{CN}.RSV.r\_{\text{C:pu}} \text{ ; } ar\_{\text{mem}} = \sum\_{\text{CN in S}} \text{CN}.RSV.r\_{\text{mem}} \text{ ; } \}$$

$$ar\_{\text{disk}} = \sum\_{\text{CN in S}} \text{CN}.RSV.r\_{\text{R:disk}} \text{ ; } ar\_{\text{net}} = \sum\_{\text{CN in S}} \text{CN}.RSV.r\_{\text{net}} \text{ ; }$$

*y1=arCpu/(arCpu +armem +ardisk+arnet); y2=armem/(arCpu +armem +ardisk+arnet);* 

*y3=ardisk/(arCpu +armem +ardisk+arnet); y4=arnet/(arCpu +armem +ardisk+arnet);* 

};

Construct the vector Y(y1,y2,y3,y4); e=|y1-w1|+|y2-w2|+|y3-w3|+|y4-w4|; if mine<e then { LCC=S; mine=e }; LCCS=LCCS-{S}; };// end while

