**3. Construction of logical cluster**

When GA received the information from all cache nodes in DNE, the logical computer cluster will be constructed for Parallel Cache Model. Here PCS={ CNi(idi, CTi, ASi, RSVi, sti)| 1≤i≤n } is the set of all cache nodes in DNE. Actually, as different cache node may provide different resources, we must classify the cache nodes to different power logical computer clusters according to their power. Therefore, the principle of classification is based on their power of CPU, Memory, Disk, and Net adapter. In order to solve this problem, we should firstly discrete the power data, and fuzzy relation theory is employed to represent the data.

#### **3.1 Resource matrix**

138 Grid Computing – Technology and Applications, Widespread Coverage and New Horizons

**Definition.6.** Duplication Segment (DSEG) is the SEG (definition 5) duplication stored in Grid memory, and it can be defined as DSEG (SEG-id, CA, CN, ST), where SEG-id is the identifier of its SEG; CA is the cache agent for managing and accessing the DSEG; CN is the cache node on which the DSEG is stored. ST∈ {"Memory", "Disk"} is its states, and "Memory" denotes that the DSEG is in the memory of cache node, and "Disk" denotes that the DSEG is in the local disk of cache node. In the follow, we will give the detail definition

**Definition.7.** Segment (SEG) is the file basic unit and it can be defined as SEG (SEG-id, File, DSEGS, LOC), where SEG-id is the identifier of SEG; File is the file that includes this SEG; DSEGS = {DSEG1, DSEG2 … DSEGd} is the set of all its active DSEGs; LOC is its server address. |SEG | is the numbers of DSEGS elements and it is called the duplication width of

So, the file in PCMGM can be presented as a SEG sequence {SEG1, SEG2 … SEGf}, and the length of all SEGs is a constant Segl, and it is called the segment length, and its measure unit is BMU. Each file has its private segment length by its characteristic. The SEG duplication stored in Grid memory is called as duplication segment (DSEG). We call this structure file as

**Definition.8.**Cache agent (CA) is defined as CA (id, DSEG, RDV, PRG, BDI, KS, CE), where id is the identifier of CA; DSEG is the duplication segment which is managed by CA; RDV (dcpu, ddisk, dnet) is the resource demand vector of CA and it is the need rate for CPU, DISK and NET ; PRG is the executable program set of CA; BDI is the description of its BDI; KS is

CA is the basic element to manage DSEG, and a CA can serve for a group of users; the

Cache file

DSEG2

DSEG2

DSEG3

SEG1 SEG2 SEG3 SEG4 SEG5

Grid memory

CN

CA

CA

CN

DSEG3

DSEG3

DSEG1

CA

CA

CA

CA

relations between CA, SEG, DSEG, and cache file is presented in figure 2.

Fig. 2. The relations between CA, DSEG, SEG and the cache file

CA

CA

CA

CN

DSEG1

DSEG1

DSEG1

its knowledge set; CE is its configuration environment.

about SEG.

the SEG.

the cache file.

Suppose that MR= (rij) (1≤i≤n, 1≤j≤4) is the resource matrix in DNE. Fi denotes as CPU frequency of CNi, here it is measured in MHZ; Mi denotes as memory capacity of CNi, and it is measured in MB; Ri indicates Disk speed of CNi, and it is measured in RPM; Ni indicates communication power of CNi, and it is measured in MBS; The resource matrix elements are determined by the real ability of cache nodes, and the calculation method is as follows:

$$r\_{i1} = \left\lfloor \frac{F\_i}{500 \text{MHz}} \right\rfloor + 1 \;:$$
 
$$r\_{i2} = \left\lfloor \frac{M\_i}{128 \text{MB}} \right\rfloor + 1 \;:$$
 
$$r\_{i3} = \begin{cases} 1, when \text{ } R\_i = 5400 \text{RPM}; \\ 2, when \text{ } R\_i = 7200 \text{RPM}; \\ 3, when \text{ } R\_i = 10000 \text{RPM}; \end{cases}$$
 
$$r\_{i4} = \begin{cases} 1, when \text{ } N\_i = 10 \text{MBS}; \\ 2, when \text{ } N\_i = 1000 \text{MBS}; \\ 3, when \text{ } N\_i = 1000 \text{MBS}; \end{cases}$$

#### **3.2 Partition for logical computer cluster**

It is very important to divide different logical computer clusters, then the LCC division algorithm as follows:

Research and Implementation of Parallel Cache Model Through Grid Memory 141

Obviously, the *LCC* may span many different networks in *DNE*, so *LCC* can be optimized through the network skip distance, network bandwidth, and the resource demand vector of *T*. Suppose that *NSET*= {*Ni* (*bwi*)| 1≤*i*≤*m*} is the network set in *LCC. bwi* indicates bandwidth of *Ni*, and *m* indicates the numbers of network. *RDV* (*w1, w2, w3, w4*) indicates the resource

1. Construct network matrix *NM*= (*sij*) (1≤*i*≤m, 1≤*j*≤*m*) that is composed of the factors of the network skip distance and bandwidth. The construction method for *NM* is as

> <1;

demand vector of task *T*. The process is described as follows:

(*distance*( *Ni* – *Nj*)+ | *bwi* – *bwj* |*)*,when *i*≠*j*, and 0<

If *Ni.bwi*=1 and (*Nj.bwj*=3 or *Nj.bwj*=6) then distance(*Ni*, *Nj)*=6 If *Ni.bwi*=3 and (*Nj.bwj*=1 or *Nj.bwj*=6) then distance(*Ni*, *Nj)*=6 If *Ni.bwi*=6 and (*Nj.bwj*=1 or *Nj.bw*j=3) then distance(*Ni*, *Nj)*=6

When the bandwidth of *Ni* is 10MB, *bwi*=1; When the bandwidth of *Ni* is 100MB, *bwi*=3; When the bandwidth of *Ni* is 1000MB, *bwi*=6;

2. Build the fuzzy equivalence matrix:

*SLCCS*=*SLCC1*∪*SLCC2*∪…∪*SLCCe* by *FMc* ;

**4. Description of agent learning model** 

The agent rules are described as follows:

When the network skip distance between *Ni* and *Nj* is 1, distance (*Ni*, *Nj*) =1; When the network skip distance between *Ni* and *Nj* is 2, distance (*Ni*, *Nj*) =3; When the network skip distance between *Ni* and *Nj* > 2, distance (*Ni*, *Nj*) =6;

*FT*=*NM* ⊙ *NM*; //⊙ is the operation theorem to take the maximum and minimum

Because of the difference resources which *CC*, *CN*, and the network provided in *DNE*, their

**Definition.10.Cache node type (CNT)** can be defined by RSV (rcpu, rmem, rdisk, rnet) of the cache node. According to the real conditions of each CN in DNE, the CN types can be

**Definition.11.Network type (NT)** is defined as *NT* (*B*, *PRT*), where *B* denotes as the network bandwidth of *CC*; *PRT* indicates network protocols of *CC*. According to the real condition of networks, network types can be divided into the network type set *NTS*= {*NT1*,

3. calculate the *c*-cut matrix *FMc* by *w4* of resource demand vector of *T*; 4. Divide the cache nodes of *LCC* into several equivalence class

5. *SLCCS* is the set of optimized *LCC* according to the network factors.

types must be considered. These types are described as follows:

divided into the cache node type set CTS= {CT1, CT2,...,CTct}.

**3.4 Optimized LCC** 

follows:

*sii*=1; *sij*=1- 

Where,

Repeat do

NM=FT; End do;

*NT2*,...,*NTnt*}.

If *FT*=*NM* then goto (4);
