**2.3 Cache file and cache agent**

The large file is always divided into a series of segments (SEG) in the file server and the access frequency of each segment is different, so the high access frequency segment is called as the hot segment. If the hot segment is duplicated into the grid memory, the access efficiency will be improved greatly. For describing this mechanism, we introduce some conceptions.

Research and Implementation of Parallel Cache Model Through Grid Memory 139

**Defination.9. Cache node ability (CNA)** is defined as CNA (CN-id, Ma, Ca), where CN-id is the identifier of CN; Ma is the memory storage ability for storing DSEG in its memory and

**,** Ca is its computing ability for supporting the cache agent and

*CN RSV r CA.RDV.d* 

*disk*

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

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:

> *ri1*<sup>=</sup> 500MHZ *Fi*

*ri2*<sup>=</sup> 128MB *Mi*

> *i i i*

> > *i i i*

It is very important to divide different logical computer clusters, then the LCC division

*1,when N = 10MBS; 2,when N = 100MBS 3,when N = 1000MBS;*

*1,when R = 5400RPM; 2,when R = 7200RPM; 3,when R = 10000RPM;*

*ri3*=

*ri4*=

**3.2 Partition for logical computer cluster** 

algorithm as follows:

 

> 

+1;

+1;

, . . *net*

*CN RSV r CA.RDV.d* 

*net*

}

Ma**<sup>=</sup>** . .

the data.

**3.1 Resource matrix** 

BMU *CN RSV rmem*

Ca=.minimum { . . *cpu*

*cpu*

, . . *disk*

*CN RSV r CA.RDV.d* 

**3. Construction of logical cluster** 

**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 about SEG.

**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 the SEG.

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 the cache file.

**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 its knowledge set; CE is its configuration environment.

CA is the basic element to manage DSEG, and a CA can serve for a group of users; the 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

**Defination.9. Cache node ability (CNA)** is defined as CNA (CN-id, Ma, Ca), where CN-id is the identifier of CN; Ma is the memory storage ability for storing DSEG in its memory and

Ma**<sup>=</sup>** . . BMU *CN RSV rmem* **,** Ca is its computing ability for supporting the cache agent and

Ca=.minimum { . . *cpu cpu CN RSV r CA.RDV.d* , . . *disk disk CN RSV r CA.RDV.d* , . . *net net CN RSV r CA.RDV.d* }
