**3.4 Update method**

For updating, an extra bitmap called a ''counter bitmap'' will be used. The number of positions in this bitmap depends on the number of types of resources in the grid

A New Approach to Resource Discovery in Grid Computing 81

In the update path, node F sends its changed bitmap to node C. If this information does not reach before the time that node C has been considered, node C restores its bitmap to the previous state, otherwise node C, after receiving the bitmap of node F, investigates the condition of removed pair positions and checks the related position of these pair positions in the counter bitmap which is 1 in node C (a nonzero number), so for the information of a resource available in one of the children of node C (nodes D or E), node C takes the information of the children nodes (except a child which has taken that changed bitmap (here node F)). Finally, node C, places numbers 4 and 5 in the condition of removed positions after investigating the information of nodes D and E. So, the bitmap will be sent to node A. Node A after observing that the contents of related pair positions are nonzero, sees there is no need to collect the information of the children, and with this information, updates its previous information. In our update method, information of children is gathered only in one

of levels, and all through the path, just visited by one node in any level of tree.

Fig. 7. An example of tree update.

environment. For example, if there are 5 kinds of operating systems, this counter bitmap will also have 5 positions. The current bitmap represents the number of resources existing in children or descendant of that node.

The method is that the user places two 1s in pair positions which are requested for that resource, and if the request reaches a node, multiplies with the bitmap present in that node until it reaches a node in which its multiplication result would be a number except zero. Using these two numbers and the weight of edges, the target will be found. In the update method, when a request reaches a node with information opposite zero, numbers are removed from the pair positions of that node and two number 0s are placed in two positions which the numbers are removed from and this process will be continued in the path nodes until reaching the target node. When reaching the target node, the numbers 0 and 1 available in two related positions would be 0 and 0.

If the expected resource is to be delivered to the user, no node must have access to the resource address, in other words another user cannot use it. In the current method, the path nodes wait some time after the user's query makes some changes in their path and counter bitmaps, until a message is received from the same path to which the user's query had been sent, to update the changed positions (0 0). If the period of time (time out) ends, this node restores its previous information to the related places.

Otherwise it receives a bitmap. First, this node investigates the pair positions which have been changed in its bitmap. If it contains the information of a resource, puts the contents of the mentioned pair positions in a related place in its bitmap and sends this to its father node and the father node again iterates the process, and because it observes that the contents of these two positions are opposite zero, it tries to reach the root which then the tree is updated.

In the next state, the pair positions that have arrived from the child contain the address of no resource (to be 0 0), so the node checks the contents of the related position in its counter bitmap. If this position is zero, it means that there is no resource in the children and descendant of this node and the bitmap will be sent to its father node, otherwise if this position is any number except zero, there will at least be information related to the expected resource in one of its children. So, this node takes from its children, the path bitmaps, and finds the address of considered resource from one of children, and replaces it with the removed pair positions and then delivers the path bitmap to its father node and the father node, there will be no need to collect the information of children and only the path bitmap which when the contents of its two positions is changed moves to the root node until it stops. In Fig. 7, we show an example of update. Suppose that there are two types of resources in this grid environment, so our path bitmap will have 4 positions and the counter bitmap 2 positions. If a request sent to node B, as (Fig. 7), the result of multiplication of this request with the path bitmap of node B would be zero and the request will be sent to the father node i.e. node A, there is a resource in address 3 6 (110).

The request removes 3 6 from path bitmap of node A, and also decreases by one unit the contents of the related position in the counter bitmap. Then the request goes to node C and the process continues. Finally, it reaches node F, the target node, so its contents which have been 0 1 will be 0 0 and it reserves this resource.

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

environment. For example, if there are 5 kinds of operating systems, this counter bitmap will also have 5 positions. The current bitmap represents the number of resources existing in

The method is that the user places two 1s in pair positions which are requested for that resource, and if the request reaches a node, multiplies with the bitmap present in that node until it reaches a node in which its multiplication result would be a number except zero. Using these two numbers and the weight of edges, the target will be found. In the update method, when a request reaches a node with information opposite zero, numbers are removed from the pair positions of that node and two number 0s are placed in two positions which the numbers are removed from and this process will be continued in the path nodes until reaching the target node. When reaching the target node, the numbers 0 and 1

If the expected resource is to be delivered to the user, no node must have access to the resource address, in other words another user cannot use it. In the current method, the path nodes wait some time after the user's query makes some changes in their path and counter bitmaps, until a message is received from the same path to which the user's query had been sent, to update the changed positions (0 0). If the period of time (time out) ends, this node

Otherwise it receives a bitmap. First, this node investigates the pair positions which have been changed in its bitmap. If it contains the information of a resource, puts the contents of the mentioned pair positions in a related place in its bitmap and sends this to its father node and the father node again iterates the process, and because it observes that the contents of these two positions are opposite zero, it tries to reach the root which then the tree is

In the next state, the pair positions that have arrived from the child contain the address of no resource (to be 0 0), so the node checks the contents of the related position in its counter bitmap. If this position is zero, it means that there is no resource in the children and descendant of this node and the bitmap will be sent to its father node, otherwise if this position is any number except zero, there will at least be information related to the expected resource in one of its children. So, this node takes from its children, the path bitmaps, and finds the address of considered resource from one of children, and replaces it with the removed pair positions and then delivers the path bitmap to its father node and the father node, there will be no need to collect the information of children and only the path bitmap which when the contents of its two positions is changed moves to the root node until it stops. In Fig. 7, we show an example of update. Suppose that there are two types of resources in this grid environment, so our path bitmap will have 4 positions and the counter bitmap 2 positions. If a request sent to node B, as (Fig. 7), the result of multiplication of this request with the path bitmap of node B would be zero and the request will be sent to the

The request removes 3 6 from path bitmap of node A, and also decreases by one unit the contents of the related position in the counter bitmap. Then the request goes to node C and the process continues. Finally, it reaches node F, the target node, so its contents which have

children or descendant of that node.

available in two related positions would be 0 and 0.

restores its previous information to the related places.

father node i.e. node A, there is a resource in address 3 6 (110).

been 0 1 will be 0 0 and it reserves this resource.

updated.

Fig. 7. An example of tree update.

In the update path, node F sends its changed bitmap to node C. If this information does not reach before the time that node C has been considered, node C restores its bitmap to the previous state, otherwise node C, after receiving the bitmap of node F, investigates the condition of removed pair positions and checks the related position of these pair positions in the counter bitmap which is 1 in node C (a nonzero number), so for the information of a resource available in one of the children of node C (nodes D or E), node C takes the information of the children nodes (except a child which has taken that changed bitmap (here node F)). Finally, node C, places numbers 4 and 5 in the condition of removed positions after investigating the information of nodes D and E. So, the bitmap will be sent to node A. Node A after observing that the contents of related pair positions are nonzero, sees there is no need to collect the information of the children, and with this information, updates its previous information. In our update method, information of children is gathered only in one of levels, and all through the path, just visited by one node in any level of tree.

A New Approach to Resource Discovery in Grid Computing 83

Our method

Tree height 4

Our method Tree height…

0 2000 4000 6000

**Number of visited nodes**

Fig. 8. The number of nodes that queries are forwarded to for 180 queries.

0 1000 2000

**Number of visited nodes**

Fig. 9. The number of nodes that queries are forwarded to.

10

15

40

85

**Grid size**

156

259

15

20

**Number of Index Servers**

25

30
