## 4 Simulation Results and Discussion
### Experiments with CPNRA
#### 4.2.3 Average Response Time  
In Reference [36], it has been proven that the mean number of jobs \(\widehat{N}\) in a service center \(i\) is equal to the product of the mean arrival rate \(\lambda_{i}\) by the average response time (also known as turnaround time), \(\widehat{t}_{i}\). The average response time is the time a jobs spends inside the service center:  
\[\widehat{N}_{i}=\lambda_{i}\widehat{t}_{i}=\frac{p_{i}}{1-p_{i}}. \tag{8}\]  
Now, the average response time is  
\[\widehat{t}_{i}=\frac{\widehat{N}_{i}}{\lambda_{i}}=\frac{p_{i}}{\lambda_{i}( 1-p_{i})}. \tag{9}\]  
Now, using Equation (3), we replace \(\lambda_{i}\) with \(p_{i}\times\mu\) to get:  
\[\widehat{t}_{i} =\frac{p_{i}}{(p_{i}\times\mu)(1-p_{i})}\] \[=\frac{1}{\mu(1-p_{i})}. \tag{10}\]  
Since \(p_{i}\) is the resource server utilization, Equation (10) states that _as the resource utilization increases, the average response time also increases_.  
Figure 8: Individual resource utilization over a period of one hour.  
Figure 9: Average resource utilization with small number of users (up to 20).  
In Figure 10, we present some average total response times for a simulation that was executed for 3600 s (1 h) and a number of 300 users, which request all 3 resources. The reason we \"forced\" the user jobs to request all the resources available was to have \"fair\" comparisons for the average response times computed for different system utilization values. For example, if some jobs requested only the dominant resource, their average response time would be far less compared to the corresponding time for jobs that request all the resources. As in the other simulation sets, we set the value of \(\mu\) for every queue equal to 30 jobs per second, thus, the system's input rate was at most \(\lambda=30\). Similar results can be obtained even if we use different \(\mu\) values for the queues. In this set, we use a constant value of \(\mu\) for simplicity. The total response time \(\widehat{t}_{Total}\) is the sum of the response times computed per queue:  
\[\widehat{t}_{Total}=\frac{1}{\mu}\sum_{i=1}^{3}\frac{1}{1-p_{i}}+\Delta, \tag{11}\]  
where \(\Delta\) is the time elapsed between the job arrival in the system and the sum of the times that it is ready to be served (that is, the corresponding transition is enabled) and the actual service time (transition firing and application of the relative changes in the system's status). In Figure 10 we show these \(\widehat{t}_{i}\) values for system utilization 0.1 and for a system utilization that approaches 1. When the system utilization was 0.1, we had a mean arrival rate of \(\lambda=3\) jobs/s and the mean response time for all the user jobs (or tokens in the model) was found to be 0.04 s. When the system utilization approached 1, we had a mean arrival rate of \(\lambda\approx 30\) jobs/s and the mean response time for all the user jobs (or tokens in the model) was found to be 10 s. For a utilization equal to zero, from Equation (10) we can see that the minimum average response time for all the jobs approaches 0.03 s. Thus, when the system utilization is 0.1, then, the tokens remain in the system 0.04/0.03 = 1.33 times the minimum value of \(\widehat{t}\), while when the system utilization approaches 1, the tokens remain in the system about \(10/0.03=333\) times the minimum value of \(\widehat{t}\).  
Figure 10: Average response times.