3. A tool to determine expected bandwidth to a remote host
4.7 Validating the Mobile Agent Model
One of the most difficult problems facing a simulation analyst is trying to determine whether a simulation model is an accurate representation of the actual system being studied, i.e., whether the model is valid. Thus, the first step in the simulation analysis by a new model is its validation. Various techniques can be employed for validating a model. The most definitive technique is to establish that the model’s output data closely resemble the output data that would be obtained from the actual system. But sometimes it is difficult to get such data from the actual system. Hence other less difficult approaches must be employed. One of these is to recognize the parameters of a system and describe their relations in the form of a mathematical model that can be further used to check the effectiveness of the simulation model. In this section, we have shown the effectiveness of the mobile agent model using a simple mathematical model inspired by work done in (Strasser pg. 18).
The authors in (Strasser pg. 18) derived the equations for execution time requirement and network load for a simple scenario consisting of two nodes and a single interaction using mobile agents. We have made certain modifications in these equations for taking into account the following two differences between the mathematical model in (Strasser pg. 18) and the simulation model considered in this thesis.
1. Agent’s code caching is not considered in this thesis. Thus the entire agent code is transmitted along with its data and execution stack. On the
other side, in (Strasser pg. 18), agent’s code is transmitted only if it is not available at the receiving node.
2. This thesis also does not consider the optimization of sending only the results back to the agent’s home node instead of entire agent as is considered in (Strasser pg. 18).
Thus the scenario considered here consists of a client at node n1 that launches an agent A to a server at node n2. This agent may perform some filtration of the results by remote processing and finally returns back to the requesting node with the results. The agent consists of Bcode bytes of code, Bdata
bytes of data and Bstate bytes of execution state and is described by the triple BA
= (Bcode, Bdata, Bstate). The size of the reply from the server is Brep and the selectivity of the agent is given by σ. Thus the actual size of the results that agent is required to carry after remote processing is (1-σ) Brep.
Thus, the total network load for the migration of an agent A from node n1 to node n2 and then back from node n2 to node n1 along with filtered results can be given as:
BMR = Bcode + Bdata + Bstate + (1-σ) Brep 4.3
Further, δ denotes the delay and τ denotes the throughput of the link between nodes n1 and n2 and also µ represents the marshalling overhead (represented by m_factor_ in the simulation model of this thesis). Thus the execution time for a single agent migration from node n1 to node n2 will be
TMig = δ + [(1 / τ) + 2µ] ( Bcode + Bdata + Bstate)
Similarly, the total execution time for the entire agent task, neglecting any other processing time, can be given as:
TMR = TMig + δ + [ (1/ τ) + 2µ ] BMR 4.4 The above equation represents the mathematical model and is further used for validation of the simulation model. The input parameters to both the simulation model and the above equation are kept same and the output data are compared (see Figure 4.10) (Law and Kelton 2000). The same input data helps to get a statistically more precise comparison. This approach is called the correlated inspection approach (Law pg. 74).
Same
Figure 4.10 Validation of the Mobile agent Model.
The parameters used for feeding both simulation and mathematical model are given in Table 4.6. It is important to note here that though throughput τ is considered to be constant in above equations, it varies notably during
simulation along with the amount of data to be transmitted during each interaction. This is because the data transmitted during simulation is much less comparing to the bandwidth of the link (1 Mb) and hence more transmission of data results in higher throughput. This variation in throughput along with the change in selectivity of the agent is shown in Figure 4.11. As the selectivity of the agent increases, the number of bytes required transmitting decreases and hence the throughput also decreases. Due to this variation in throughput, its mean value that is calculated over all the interactions is used in the above equations.
Table 4.6 Parameter Values used for Validation
Parameters Values code_size_ 10000 bytes data_size_ 5000 bytes status_size_ 0 bytes
req_size 1000 bytes Average
Throughput
80,976 bytes/sec or 647.81 Kbps
Latency 20 ms
66000
Figure 4.11. Variation of throughput with agent’s selectivity
0
Figure 4.12. Comparison of mathematical and simulation model.
Simulation is done by varying the selectivity of the mobile agent from 0 to 1 at a fixed reply size of 20,000 bytes and the total time required for the interaction is measured. Also substitution of similar parameters in equation 4.4 gives the corresponding time for the mathematical model. Figure 4.12 shows the results obtained from both the models. The direct comparison based on the graph shows the resemblance between the two models. The mean of the differences between the outputs of two models is calculated in Table 4.7. The percentage mean-difference from the mathematical model thus obtained is about 4.4%. This is satisfactory considering notable variations in throughput experienced during simulation along with the variation in number of bytes to be transmitted (see Figure 4.11). Thus, the simulation model precisely corresponds to the mathematical model and hence can be effective in the preliminary studies of the mobile agent technology.
Table 4.7. Output from Models and their Differences
0 0.57737602 0.637467 -0.06009098
0.1 0.56009602 0.612768 -0.05267198
0.2 0.54281602 0.58807 -0.04525398
0.3 0.52585602 0.563371 -0.03751498
0.4 0.50857602 0.538672 -0.03009598
0.5 0.49129602 0.513974 -0.02267798
0.6 0.47401602 0.489275 -0.01525898
0.7 0.45705602 0.464576 -0.00751998
0.8 0.43976802 0.439877 -0.00010898
0.9 0.42248802 0.415179 0.00730902
1 0.40521602 0.39048 0.01473602
Mean 0.4913236 (Xmean) 0.5139735 (Ymean) -0.0226498 (Zmean) Percentage
Difference = |(Zmean/Ymean)* 100| 4.406820
The exact validation of the model might be possible using the actual system data rather than that from mathematical model. But this was difficult to measure due to the unavailability of the resources and limited scope of this research. This can be considered as a part of the future work in further development of this simulation model.
CHAPTER-5
Simulating Wireless Applications Using Mobile Agent Model
The Network Simulator NS2 along with the extension of mobile agent as described in the previous chapter is used to simulate certain basic wireless applications where the usage of the mobile agents is believed to be beneficial. The list of applications where the mobile agent paradigm may be used is given in section 3.3 of chapter 3. Out of all those applications, this study concentrates on the deployment of the mobile agent paradigm in information retrieval and also in middleware for providing service adaptation to a mobile device. The information retrieval application is studied for two different scenarios (section 5.1 and 5.2 respectively), both of which consist of a number of servers and a client looking for certain set of information. A brief study of the performance of mobile agent in the middleware is described in section 5.3