Bhavani Prasad Sangannagari
Project 1
Source code for poisson arrivals…………………………………………………..1
Source code for Erlang 5 distribution…………………………………………… 5
source code for correlated hyperexponential process…………………………….8
Csim report for poisson process………………………………………………….12
Csim report for Erlang 5 distribution…………………………………………….17
Csim report for correlated hyperexponential process…………………………….22
Confidence interval………………………………………………………………39
Summary…………………………………………………………………………40
Source code for poisson arrivals
#include<stdio.h>
#include<stdlib.h>
#include "csim.h"
#define tok_arr 0.75
#define cust_arr 0.5625
#define serv_t 1.0
#define NARS 100000
#define BUCK_SIZE 10
FACILITY server;
EVENT done,pac_rel;
TABLE tb1,tb2,tb3,tb4;
QTABLE qtb1,qtb2;
void gen_arr();
void gen_tok();
void cust_serv(TIME);
int cnt,pac_cnt=0,token=0;
void sim()
{
create("sim");
server = facility("server");
done = event("done");
pac_rel=event("pac_rel");
tb1 = table("cell waiting time for token");
tb2 = table("waiting time in service buffer");
tb3 = table("total time cell spends in the system");
qtb1 = qhistogram("cells waiting for token",101);
qtb2 = qhistogram("cells waiting for service",101);
cnt = NARS;
gen_tok();
gen_arr();
wait(done);
report();
mdlstat();
}
void gen_tok() {
create("gen_tok"); // how token arrival is exp;
while(1){
hold(expntl(1/(tok_arr)));
if ((token < BUCK_SIZE)||(BUCK_SIZE == 0))
token++;
if ((token > 0)&(pac_cnt > 0))
set (pac_rel);
}
}
void gen_arr() {
TIME t1,t3,temp;
int i;
create("gen_arr");
for(i=cnt;i>0;i--) {
hold(expntl(1/(cust_arr)));
t1 = clock;
note_entry(qtb1);
if((token > 0)&(pac_cnt <1))
token--;
if (token < 1) {
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
if (pac_cnt > 0)
{
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
temp = clock - t1;
record(clock - t1,tb1);
note_exit(qtb1);
cust_serv(temp);
}
}
void cust_serv(TIME temp1) {
TIME t2,t3,temp2;
create("cust_serv");
t2 = clock;
note_entry(qtb2);
reserve(server);
temp2 = clock - t2;
record(clock - t2,tb2);
note_exit(qtb2);
t3 = clock;
hold(expntl(serv_t));
release(server);
record((clock - t3) + temp1 + temp2,tb3);
cnt--;
if (cnt == 0)
set(done);
}
Source code for Erlang 5 distribution
Code :
#include<stdio.h>
#include<stdlib.h>
#include "csim.h"
#define tok_arr 0.75
#define cust_arr 0.5625
#define serv_t 1.0
#define NARS 100000
#define BUCK_SIZE 0
FACILITY server;
EVENT done,pac_rel;
TABLE tb1,tb2,tb3,tb4;
QTABLE qtb1,qtb2;
void gen_arr();
void gen_tok();
void cust_serv(TIME);
int cnt,pac_cnt=0,token=0;
void sim()
{
create("sim");
server = facility("server");
done = event("done");
pac_rel=event("pac_rel");
tb1 = table("cell waiting time for token");
tb2 = table("waiting time in service buffer");
tb3 = table("total time cell spends in the system");
qtb1 = qhistogram("cells waiting for token",101);
qtb2 = qhistogram("cells waiting for service",101);
cnt = NARS;
gen_tok();
gen_arr();
wait(done);
report();
mdlstat();
}
void gen_tok() {
create("gen_tok"); // how token arrival is exp;
while(1){
hold(expntl(1/(tok_arr)));
if ((token < BUCK_SIZE)||(BUCK_SIZE == 0))
token++;
if ((token > 0)&(pac_cnt > 0))
set (pac_rel);
}
}
void gen_arr() {
TIME t1,t3,temp;
int i;
create("gen_arr");
for(i=cnt;i>0;i--) {
hold(expntl(1/(5*cust_arr)));
hold(expntl(1/(5*cust_arr)));
hold(expntl(1/(5*cust_arr)));
hold(expntl(1/(5*cust_arr)));
hold(expntl(1/(5*cust_arr)));
t1 = clock;
note_entry(qtb1);
if((token > 0)&(pac_cnt <1))
token--;
if (token < 1) {
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
if (pac_cnt > 0)
{
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
temp = clock - t1;
record(clock - t1,tb1);
note_exit(qtb1);
cust_serv(temp);
}
}
void cust_serv(TIME temp1) {
TIME t2,t3,temp2;
create("cust_serv");
t2 = clock;
note_entry(qtb2);
reserve(server);
temp2 = clock - t2;
record(clock - t2,tb2);
note_exit(qtb2);
t3 = clock;
hold(expntl(serv_t));
release(server);
record((clock - t3) + temp1 + temp2,tb3);
cnt--;
if (cnt == 0)
set(done);
}
source code for correlated hyperexponential process
#include<stdio.h>
#include<stdlib.h>
#include "csim.h"
#define tok_arr 0.75
#define cust_arr 0.5625
#define serv_t 1.0
#define NARS 100000
#define BUCK_SIZE 10
#define gamma 0
FACILITY server;
EVENT done,pac_rel;
TABLE tb1,tb2,tb3,tb4;
QTABLE qtb1,qtb2;
void gen_arr();
void gen_tok();
void cust_serv(TIME);
int cnt,pac_cnt=0,token=0;
float s1,s2,gamma1,gamma2;
void sim()
{
create("sim");
server = facility("server");
done = event("done");
pac_rel=event("pac_rel");
tb1 = table("cell waiting time for token");
tb2 = table("waiting time in service buffer");
tb3 = table("total time cell spends in the system");
qtb1 = qhistogram("cells waiting for token",101);
qtb2 = qhistogram("cells waiting for service",101);
s1 = 1/(cust_arr*0.3747871858);
s2 = 1/(cust_arr*2.998297486);
gamma1 = 0.7145289305 - 0.7145289305*gamma;
gamma2 = 0.2854710695 - 0.2854710695*gamma;
cnt = NARS;
gen_tok();
gen_arr();
wait(done);
report();
mdlstat();
}
void gen_tok() {
create("gen_tok"); // how token arrival is exp;
while(1){
hold(expntl(1/(tok_arr)));
if ((token < BUCK_SIZE)||(BUCK_SIZE == 0))
token++;
if ((token > 0)&(pac_cnt > 0))
set (pac_rel);
}
}
void gen_arr() {
TIME t1,t3,temp;
int i,j;
create("gen_arr");
for(i=cnt;i>0;i--) {
hold(expntl(s1));
t1 = clock;
note_entry(qtb1);
if((token > 0)&(pac_cnt <1))
token--;
if (token < 1) {
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
if (pac_cnt > 0) {
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
temp = clock - t1;
record(clock - t1,tb1);
note_exit(qtb1);
cust_serv(temp);
if (prob() < gamma1) {
for(j=cnt;j>0;j--) {
hold(expntl(s2));
t1 = clock;
note_entry(qtb1);
if((token > 0)&(pac_cnt <1))
token--;
if (token < 1) {
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
if (pac_cnt > 0) {
pac_cnt++;
queue(pac_rel);
pac_cnt--;
}
temp = clock - t1;
record(clock - t1,tb1);
note_exit(qtb1);
cust_serv(temp);
if (prob() < gamma2)
break;
}
}
}
}
void cust_serv(TIME temp1) {
TIME t2,t3,temp2;
create("cust_serv");
t2 = clock;
note_entry(qtb2);
reserve(server);
temp2 = clock - t2;
record(clock - t2,tb2);
note_exit(qtb2);
t3 = clock;
hold(expntl(serv_t));
release(server);
record((clock - t3) + temp1 + temp2,tb3);
cnt--;
if (cnt == 0)
set(done);
}
Csim report for poisson process
For bucket size = 0
CSIM Simulation Report (Version 18.1 for Linux x86)
Tue Apr 9 23:50:58 2002
Ending simulation time: 178613.722
Elapsed simulation time: 178613.722
CPU time used (seconds): 1.040
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 0.99625 0.558 0.55987 1.26462 2.25878 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.000126
maximum 2.152627 variance 0.000191
range 2.152627 standard deviation 0.013826
observations 100000 coefficient of var 109.568723
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 1.262533
maximum 24.604788 variance 4.061279
range 24.604788 standard deviation 2.015262
observations 100000 coefficient of var 1.596205
TABLE 3: total time cell spends in the system
minimum 0.000016 mean 2.258906
maximum 26.438049 variance 5.052087
range 26.438033 standard deviation 2.247685
observations 100000 coefficient of var 0.995033
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.000071
final 0 maximum 1 variance 0.000071
entries 100000 range 1 standard deviation 0.008405
exits 100000 coeff of variation 118.969861
cumulative
number total time proportion proportion
0 178601.10347 0.999929 0.999929 ********************
1 12.61857 0.000071 1.000000 .
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 0.706851
final 0 maximum 18 variance 1.974795
entries 100000 range 18 standard deviation 1.405274
exits 100000 coeff of variation 1.988077
cumulative
number total time proportion proportion
0 122623.27696 0.686528 0.686528 ********************
1 24823.22450 0.138977 0.825505 ****
2 13853.21589 0.077560 0.903065 **
3 7606.33498 0.042585 0.945650 *
4 4222.14890 0.023638 0.969288 *
5 2493.24291 0.013959 0.983247 .
6 1381.53644 0.007735 0.990982 .
7 729.65128 0.004085 0.995067 .
8 393.22158 0.002202 0.997269 .
9 217.71141 0.001219 0.998487 .
10 119.54709 0.000669 0.999157 .
11 60.56842 0.000339 0.999496 .
12 39.62114 0.000222 0.999718 .
13 23.91655 0.000134 0.999852 .
14 11.56268 0.000065 0.999916 .
15 6.70889 0.000038 0.999954 .
16 4.45117 0.000025 0.999979 .
17 2.03368 0.000011 0.999990 .
18 1.74759 0.000010 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.040
Events processed: 490081
Memory allocated: 15568 bytes
Calls to malloc: 72
Processes
Started: 100003
Saved: 288270
Terminated: 100001
High water mark: 22
Stacks
Allocated: 100003
High water mark: 1180 words
Average: 55 words
Maximum: 56 words
Current: 72 words
For bucket size = 10
CSIM Simulation Report (Version 18.1 for Linux x86)
Tue Apr 9 23:52:57 2002
Ending simulation time: 180406.148
Elapsed simulation time: 180406.148
CPU time used (seconds): 1.010
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 0.99891 0.554 0.55430 1.22006 2.20106 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.026716
maximum 10.271528 variance 0.070891
range 10.271528 standard deviation 0.266254
observations 100000 coefficient of var 9.966192
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 1.202154
maximum 19.159977 variance 3.640429
range 19.159977 standard deviation 1.907991
observations 100000 coefficient of var 1.587144
TABLE 3: total time cell spends in the system
minimum 0.000007 mean 2.227779
maximum 20.032993 variance 4.702614
range 20.032986 standard deviation 2.168551
observations 100000 coefficient of var 0.973414
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.014809
final 0 maximum 1 variance 0.014589
entries 100000 range 1 standard deviation 0.120786
exits 100000 coeff of variation 8.156473
cumulative
number total time proportion proportion
0 177734.57461 0.985191 0.985191 ********************
1 2671.57316 0.014809 1.000000 .
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 0.666360
final 0 maximum 17 variance 1.733799
entries 100000 range 17 standard deviation 1.316738
exits 100000 coeff of variation 1.976017
cumulative
number total time proportion proportion
0 125104.92975 0.693463 0.693463 ********************
1 24988.17826 0.138511 0.831973 ****
2 13883.61301 0.076958 0.908931 **
3 7560.80077 0.041910 0.950841 *
4 4262.69455 0.023628 0.974469 *
5 2258.62143 0.012520 0.986989 .
6 1147.55130 0.006361 0.993350 .
7 592.67362 0.003285 0.996635 .
8 329.88792 0.001829 0.998463 .
9 154.95110 0.000859 0.999322 .
10 64.03802 0.000355 0.999677 .
11 24.21592 0.000134 0.999812 .
12 13.37224 0.000074 0.999886 .
13 7.98273 0.000044 0.999930 .
14 4.70994 0.000026 0.999956 .
15 2.28975 0.000013 0.999969 .
16 1.11231 0.000006 0.999975 .
17 4.52516 0.000025 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.010
Events processed: 492222
Memory allocated: 15332 bytes
Calls to malloc: 70
Processes
Started: 100003
Saved: 291038
Terminated: 100001
High water mark: 21
Stacks
Allocated: 100003
High water mark: 1124 words
Average: 55 words
Maximum: 56 words
Current: 72 words
Results for erlang 5 distribution
For bucket size = 0
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 08:19:40 2002
Ending simulation time: 177869.855
Elapsed simulation time: 177869.855
CPU time used (seconds): 1.360
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 0.99951 0.562 0.56221 0.86753 1.54307 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.000023
maximum 1.380986 variance 0.000024
range 1.380986 standard deviation 0.004915
observations 100000 coefficient of var 214.302665
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 0.543557
maximum 17.140776 variance 1.367681
range 17.140776 standard deviation 1.169479
observations 100000 coefficient of var 2.151531
TABLE 3: total time cell spends in the system
minimum 0.000021 mean 1.543089
maximum 18.707058 variance 2.353743
range 18.707036 standard deviation 1.534191
observations 100000 coefficient of var 0.994234
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.000013
final 0 maximum 1 variance 0.000013
entries 100000 range 1 standard deviation 0.003591
exits 100000 coeff of variation 278.486954
cumulative
number total time proportion proportion
0 177867.56173 0.999987 0.999987 ********************
1 2.29344 0.000013 1.000000 .
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 0.305592
final 0 maximum 11 variance 0.540172
entries 100000 range 11 standard deviation 0.734964
exits 100000 coeff of variation 2.405047
cumulative
number total time proportion proportion
0 142536.30232 0.801352 0.801352 ********************
1 22957.79399 0.129071 0.930422 ***
2 8025.65022 0.045121 0.975543 *
3 2831.81568 0.015921 0.991464 .
4 1004.09975 0.005645 0.997109 .
5 342.69156 0.001927 0.999036 .
6 120.76331 0.000679 0.999715 .
7 30.31157 0.000170 0.999885 .
8 5.47060 0.000031 0.999916 .
9 8.97780 0.000050 0.999966 .
10 5.81357 0.000033 0.999999 .
11 0.16480 0.000001 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.360
Events processed: 869481
Memory allocated: 12436 bytes
Calls to malloc: 56
Processes
Started: 100003
Saved: 449812
Terminated: 100001
High water mark: 15
Stacks
Allocated: 100003
High water mark: 788 words
Average: 55 words
Maximum: 56 words
Current: 72 words
Results for k = 10
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 08:26:42 2002
Ending simulation time: 178235.598
Elapsed simulation time: 178235.598
CPU time used (seconds): 1.350
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 0.99933 0.561 0.56106 0.86835 1.54770 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.004481
maximum 7.327109 variance 0.011337
range 7.327109 standard deviation 0.106476
observations 100000 coefficient of var 23.762745
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 0.548375
maximum 14.974943 variance 1.355128
range 14.974943 standard deviation 1.164100
observations 100000 coefficient of var 2.122818
TABLE 3: total time cell spends in the system
minimum 0.000020 mean 1.552186
maximum 15.604340 variance 2.343858
range 15.604321 standard deviation 1.530966
observations 100000 coefficient of var 0.986329
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.002514
final 0 maximum 1 variance 0.002508
entries 100000 range 1 standard deviation 0.050077
exits 100000 coeff of variation 19.919225
cumulative
number total time proportion proportion
0 177787.51731 0.997486 0.997486 ********************
1 448.08087 0.002514 1.000000 .
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 0.307668
final 0 maximum 11 variance 0.539872
entries 100000 range 11 standard deviation 0.734760
exits 100000 coeff of variation 2.388155
cumulative
number total time proportion proportion
0 142598.03386 0.800054 0.800054 ********************
1 23017.87494 0.129143 0.929197 ***
2 8250.51893 0.046290 0.975487 *
3 2912.96535 0.016343 0.991830 .
4 934.35749 0.005242 0.997072 .
5 374.85851 0.002103 0.999175 .
6 101.03756 0.000567 0.999742 .
7 23.80447 0.000134 0.999876 .
8 9.51853 0.000053 0.999929 .
9 8.50296 0.000048 0.999977 .
10 2.97541 0.000017 0.999994 .
11 1.15017 0.000006 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.360
Events processed: 870105
Memory allocated: 12436 bytes
Calls to malloc: 56
Processes
Started: 100003
Saved: 450159
Terminated: 100001
High water mark: 15
Stacks
Allocated: 100003
High water mark: 788 words
Average: 55 words
Maximum: 56 words
Current: 72 words
Results for correlated hyper-exponential process
For bucket size = 0 gamma = 0
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 08:52:26 2002
Ending simulation time: 177523.755
Elapsed simulation time: 177523.755
CPU time used (seconds): 1.030
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 1.00150 0.564 0.56330 2.32938 4.13520 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.000009
maximum 0.477031 variance 0.000003
range 0.477031 standard deviation 0.001817
observations 100001 coefficient of var 195.809065
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 3.133666
maximum 32.199754 variance 15.618637
range 32.199754 standard deviation 3.952042
observations 100001 coefficient of var 1.261156
TABLE 3: total time cell spends in the system
minimum 0.000003 mean 4.135199
maximum 33.459846 variance 16.629207
range 33.459844 standard deviation 4.077892
observations 100000 coefficient of var 0.986142
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.000005
final 0 maximum 1 variance 0.000005
entries 100001 range 1 standard deviation 0.002286
exits 100001 coeff of variation 437.393634
cumulative
number total time proportion proportion
0 177522.82723 0.999995 0.999995 ********************
1 0.92792 0.000005 1.000000 .
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 1.765227
final 0 maximum 29 variance 9.451344
entries 100001 range 29 standard deviation 3.074304
exits 100001 coeff of variation 1.741591
cumulative
number total time proportion proportion
0 101555.57812 0.572068 0.572068 ********************
1 18238.00981 0.102736 0.674803 ****
2 13848.79902 0.078011 0.752814 ***
3 10550.61808 0.059432 0.812246 **
4 7998.01898 0.045053 0.857299 **
5 6099.64734 0.034360 0.891659 *
6 4702.76831 0.026491 0.918150 *
7 3575.66425 0.020142 0.938292 *
8 2760.59572 0.015551 0.953842 *
9 2092.60890 0.011788 0.965630 .
10 1545.87576 0.008708 0.974338 .
11 1096.11267 0.006174 0.980513 .
12 865.22544 0.004874 0.985387 .
13 637.21514 0.003589 0.988976 .
14 474.13036 0.002671 0.991647 .
15 372.61151 0.002099 0.993746 .
16 296.85983 0.001672 0.995418 .
17 217.04932 0.001223 0.996641 .
18 141.89444 0.000799 0.997440 .
19 115.51166 0.000651 0.998091 .
20 77.03213 0.000434 0.998525 .
21 74.50516 0.000420 0.998944 .
22 58.24734 0.000328 0.999272 .
23 47.47723 0.000267 0.999540 .
24 35.66482 0.000201 0.999741 .
25 23.69331 0.000133 0.999874 .
26 10.65822 0.000060 0.999934 .
27 4.56109 0.000026 0.999960 .
28 4.17742 0.000024 0.999983 .
29 2.94378 0.000017 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.040
Events processed: 508730
Memory allocated: 20128 bytes
Calls to malloc: 95
Processes
Started: 100004
Saved: 299633
Terminated: 100000
High water mark: 33
Stacks
Allocated: 100004
High water mark: 1920 words
Average: 59 words
Maximum: 60 words
Current: 180 words
For gamma = 0 , bucket size = 10
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 08:53:58 2002
Ending simulation time: 189782.650
Elapsed simulation time: 189782.650
CPU time used (seconds): 1.050
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 1.00001 0.527 0.52692 1.71284 3.25067 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.109624
maximum 11.173340 variance 0.277248
range 11.173340 standard deviation 0.526544
observations 100001 coefficient of var 4.803183
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 2.250635
maximum 25.215077 variance 8.609839
range 25.215077 standard deviation 2.934253
observations 100001 coefficient of var 1.303744
TABLE 3: total time cell spends in the system
minimum 0.000003 mean 3.360239
maximum 27.419587 variance 9.967065
range 27.419584 standard deviation 3.157066
observations 100000 coefficient of var 0.939536
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.057763
final 0 maximum 1 variance 0.054427
entries 100001 range 1 standard deviation 0.233296
exits 100001 coeff of variation 4.038810
cumulative
number total time proportion proportion
0 178820.15007 0.942237 0.942237 ********************
1 10962.49978 0.057763 1.000000 *
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 1.185913
final 0 maximum 21 variance 4.478278
entries 100001 range 21 standard deviation 2.116194
exits 100001 coeff of variation 1.784443
cumulative
number total time proportion proportion
0 118701.63616 0.625461 0.625461 ********************
1 20826.87358 0.109741 0.735202 ****
2 15343.58440 0.080848 0.816050 ***
3 10914.08014 0.057508 0.873558 **
4 7824.51291 0.041229 0.914787 *
5 5491.28833 0.028935 0.943722 *
6 3826.09236 0.020160 0.963882 *
7 2548.72309 0.013430 0.977312 .
8 1616.71959 0.008519 0.985830 .
9 1056.55274 0.005567 0.991398 .
10 627.41422 0.003306 0.994704 .
11 399.57977 0.002105 0.996809 .
12 222.86558 0.001174 0.997983 .
13 148.07674 0.000780 0.998764 .
14 104.39693 0.000550 0.999314 .
15 61.00295 0.000321 0.999635 .
16 36.34290 0.000191 0.999827 .
17 15.95478 0.000084 0.999911 .
18 9.67322 0.000051 0.999962 .
19 3.50157 0.000018 0.999980 .
20 3.57699 0.000019 0.999999 .
21 0.20092 0.000001 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.050
Events processed: 521856
Memory allocated: 16632 bytes
Calls to malloc: 77
Processes
Started: 100004
Saved: 309826
Terminated: 100000
High water mark: 25
Stacks
Allocated: 100004
High water mark: 1440 words
Average: 59 words
Maximum: 60 words
Current: 180 words
For gamma = 0.5 bucket size = 0
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 08:55:23 2002
Ending simulation time: 178198.860
Elapsed simulation time: 178198.860
CPU time used (seconds): 1.030
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 0.99792 0.560 0.56117 3.19768 5.69823 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.000020
maximum 1.265788 variance 0.000018
range 1.265788 standard deviation 0.004205
observations 100001 coefficient of var 213.666541
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 4.700266
maximum 50.855961 variance 34.699453
range 50.855961 standard deviation 5.890624
observations 100001 coefficient of var 1.253253
TABLE 3: total time cell spends in the system
minimum 0.000041 mean 5.698235
maximum 51.573977 variance 35.695964
range 51.573936 standard deviation 5.974610
observations 100000 coefficient of var 1.048502
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.000011
final 0 maximum 1 variance 0.000011
entries 100001 range 1 standard deviation 0.003323
exits 100001 coeff of variation 300.923169
cumulative
number total time proportion proportion
0 178196.89176 0.999989 0.999989 ********************
1 1.96784 0.000011 1.000000 .
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 2.637679
final 0 maximum 45 variance 22.220942
entries 100001 range 45 standard deviation 4.713909
exits 100001 coeff of variation 1.787143
cumulative
number total time proportion proportion
0 100323.40224 0.562986 0.562986 ********************
1 13445.32600 0.075451 0.638437 ***
2 10700.27065 0.060047 0.698484 **
3 8907.51374 0.049986 0.748470 **
4 7302.31667 0.040978 0.789449 *
5 6033.88764 0.033860 0.823309 *
6 5095.55149 0.028595 0.851904 *
7 4278.65053 0.024011 0.875914 *
8 3611.98928 0.020269 0.896184 *
9 3072.96510 0.017245 0.913428 *
10 2498.38573 0.014020 0.927448 .
11 2154.88078 0.012093 0.939541 .
12 1756.17729 0.009855 0.949396 .
13 1463.41607 0.008212 0.957608 .
14 1219.25806 0.006842 0.964451 .
15 995.35973 0.005586 0.970036 .
16 884.43178 0.004963 0.974999 .
17 718.73860 0.004033 0.979033 .
18 643.52264 0.003611 0.982644 .
19 483.16102 0.002711 0.985355 .
20 457.79340 0.002569 0.987924 .
21 398.30542 0.002235 0.990160 .
22 338.19827 0.001898 0.992057 .
23 238.27028 0.001337 0.993395 .
24 217.65432 0.001221 0.994616 .
25 139.91725 0.000785 0.995401 .
26 131.24497 0.000737 0.996138 .
27 114.08327 0.000640 0.996778 .
28 81.92918 0.000460 0.997238 .
29 73.58795 0.000413 0.997651 .
30 60.76639 0.000341 0.997992 .
31 65.99078 0.000370 0.998362 .
32 69.21949 0.000388 0.998750 .
33 54.95865 0.000308 0.999059 .
34 35.10158 0.000197 0.999256 .
35 33.70142 0.000189 0.999445 .
36 40.03954 0.000225 0.999670 .
37 19.34992 0.000109 0.999778 .
38 11.79483 0.000066 0.999844 .
39 8.09422 0.000045 0.999890 .
40 6.87249 0.000039 0.999928 .
41 3.92360 0.000022 0.999950 .
42 6.32894 0.000036 0.999986 .
43 0.14196 0.000001 0.999987 .
44 1.16114 0.000007 0.999993 .
45 1.22531 0.000007 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.040
Events processed: 511948
Memory allocated: 25640 bytes
Calls to malloc: 129
Processes
Started: 100004
Saved: 301797
Terminated: 100000
High water mark: 49
Stacks
Allocated: 100004
High water mark: 2880 words
Average: 59 words
Maximum: 60 words
Current: 180 words
For gamma = 0.5 bucket size = 10
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 08:57:04 2002
Ending simulation time: 198162.394
Elapsed simulation time: 198162.394
CPU time used (seconds): 1.070
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 0.99799 0.504 0.50464 1.77430 3.51600 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.187203
maximum 11.853543 variance 0.465671
range 11.853543 standard deviation 0.682401
observations 100003 coefficient of var 3.645253
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 2.517965
maximum 24.937414 variance 10.121237
range 24.937414 standard deviation 3.181389
observations 100001 coefficient of var 1.263477
TABLE 3: total time cell spends in the system
minimum 0.000041 mean 3.703159
maximum 25.579972 variance 11.589930
range 25.579931 standard deviation 3.404399
observations 100000 coefficient of var 0.919323
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.094472
final 0 maximum 1 variance 0.085547
entries 100003 range 1 standard deviation 0.292484
exits 100003 coeff of variation 3.095987
cumulative
number total time proportion proportion
0 179441.57105 0.905528 0.905528 ********************
1 18720.82325 0.094472 1.000000 **
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 1.270681
final 2 maximum 22 variance 5.461777
entries 100003 range 22 standard deviation 2.337044
exits 100001 coeff of variation 1.839207
cumulative
number total time proportion proportion
0 127952.30045 0.645694 0.645694 ********************
1 17864.61541 0.090151 0.735846 ***
2 13438.65482 0.067816 0.803662 **
3 10415.37392 0.052560 0.856222 **
4 8038.32998 0.040564 0.896786 *
5 6112.11520 0.030844 0.927630 *
6 4577.84373 0.023101 0.950732 *
7 3237.12568 0.016336 0.967067 *
8 2310.09987 0.011658 0.978725 .
9 1610.22995 0.008126 0.986851 .
10 988.62644 0.004989 0.991840 .
11 637.39463 0.003217 0.995056 .
12 390.55838 0.001971 0.997027 .
13 234.12336 0.001181 0.998209 .
14 161.61465 0.000816 0.999024 .
15 87.69032 0.000443 0.999467 .
16 53.43653 0.000270 0.999736 .
17 23.76008 0.000120 0.999856 .
18 15.21375 0.000077 0.999933 .
19 8.46933 0.000043 0.999976 .
20 2.71145 0.000014 0.999989 .
21 0.72912 0.000004 0.999993 .
22 1.37726 0.000007 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.070
Events processed: 533200
Memory allocated: 16884 bytes
Calls to malloc: 79
Processes
Started: 100006
Saved: 317801
Terminated: 100000
High water mark: 26
Stacks
Allocated: 100006
High water mark: 1500 words
Average: 59 words
Maximum: 60 words
Current: 300 words
For gamma = 0.99 bucket size = 0
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 09:00:33 2002
Ending simulation time: 86991.249
Elapsed simulation time: 86991.249
CPU time used (seconds): 0.510
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 0.99751 0.573 0.57477 89.35072 155.45462 50000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.003406
maximum 8.496917 variance 0.010248
range 8.496917 standard deviation 0.101230
observations 50789 coefficient of var 29.724474
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 148.871313
maximum 841.272575 variance 31407.408355
range 841.272575 standard deviation 177.221354
observations 50001 coefficient of var 1.190433
TABLE 3: total time cell spends in the system
minimum 0.000046 mean 149.861787
maximum 841.341870 variance 31403.870701
range 841.341824 standard deviation 177.211373
observations 50000 coefficient of var 1.182499
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.001988
final 0 maximum 1 variance 0.001984
entries 50789 range 1 standard deviation 0.044546
exits 50789 coeff of variation 22.403843
cumulative
number total time proportion proportion
0 86818.28077 0.998012 0.998012 ********************
1 172.96815 0.001988 1.000000 .
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 88.777379
final 788 maximum 868 variance 26162.517542
entries 50789 range 868 standard deviation 161.748315
exits 50001 coeff of variation 1.821954
cumulative
number total time proportion proportion
0 45125.20945 0.518733 0.518733 ********************
1 1890.74264 0.021735 0.540468 *
2 546.76026 0.006285 0.546753 .
3 279.31829 0.003211 0.549964 .
4 208.31649 0.002395 0.552358 .
5 213.57928 0.002455 0.554814 .
6 191.55324 0.002202 0.557016 .
7 192.15651 0.002209 0.559224 .
8 165.11013 0.001898 0.561122 .
9 175.91433 0.002022 0.563145 .
10 168.25856 0.001934 0.565079 .
11 176.99930 0.002035 0.567114 .
12 180.61827 0.002076 0.569190 .
13 153.68815 0.001767 0.570957 .
14 177.63791 0.002042 0.572999 .
15 179.71604 0.002066 0.575064 .
16 193.88055 0.002229 0.577293 .
17 171.29818 0.001969 0.579262 .
18 168.26258 0.001934 0.581197 .
19 158.20247 0.001819 0.583015 .
20 169.90762 0.001953 0.584968 .
21 173.25521 0.001992 0.586960 .
22 187.74574 0.002158 0.589118 .
23 195.06140 0.002242 0.591361 .
24 195.27674 0.002245 0.593605 .
25 175.71122 0.002020 0.595625 .
26 173.81924 0.001998 0.597623 .
27 157.08003 0.001806 0.599429 .
28 168.04744 0.001932 0.601361 .
29 160.33104 0.001843 0.603204 .
30 176.84806 0.002033 0.605237 .
31 175.92290 0.002022 0.607259 .
32 165.27607 0.001900 0.609159 .
33 177.62557 0.002042 0.611201 .
34 181.25235 0.002084 0.613284 .
35 178.22966 0.002049 0.615333 .
36 169.96692 0.001954 0.617287 .
37 201.59261 0.002317 0.619605 .
38 205.55948 0.002363 0.621968 .
39 193.56173 0.002225 0.624193 .
40 187.16576 0.002152 0.626344 .
41 176.58659 0.002030 0.628374 .
42 170.09594 0.001955 0.630329 .
43 178.64774 0.002054 0.632383 .
44 145.06124 0.001668 0.634051 .
45 160.98716 0.001851 0.635901 .
46 145.49085 0.001672 0.637574 .
47 140.42809 0.001614 0.639188 .
48 161.61805 0.001858 0.641046 .
49 161.96776 0.001862 0.642908 .
50 147.48458 0.001695 0.644603 .
51 145.45168 0.001672 0.646275 .
52 174.87325 0.002010 0.648285 .
53 168.85375 0.001941 0.650226 .
54 162.58483 0.001869 0.652095 .
55 167.34535 0.001924 0.654019 .
56 177.71910 0.002043 0.656062 .
57 193.27662 0.002222 0.658284 .
58 190.86244 0.002194 0.660478 .
59 195.07706 0.002242 0.662720 .
60 158.66625 0.001824 0.664544 .
61 177.27303 0.002038 0.666582 .
62 143.88507 0.001654 0.668236 .
63 159.95042 0.001839 0.670075 .
64 139.01415 0.001598 0.671673 .
65 159.11181 0.001829 0.673502 .
66 179.48735 0.002063 0.675565 .
67 133.79862 0.001538 0.677103 .
68 144.75156 0.001664 0.678767 .
69 144.52339 0.001661 0.680429 .
70 155.64221 0.001789 0.682218 .
71 166.64257 0.001916 0.684133 .
72 140.78938 0.001618 0.685752 .
73 134.19519 0.001543 0.687294 .
74 149.34137 0.001717 0.689011 .
75 163.47424 0.001879 0.690890 .
76 121.89794 0.001401 0.692292 .
77 130.67484 0.001502 0.693794 .
78 121.01593 0.001391 0.695185 .
79 134.71938 0.001549 0.696734 .
80 127.76073 0.001469 0.698202 .
81 126.44353 0.001454 0.699656 .
82 122.11953 0.001404 0.701060 .
83 134.26186 0.001543 0.702603 .
84 130.87889 0.001505 0.704107 .
85 117.14156 0.001347 0.705454 .
86 144.26703 0.001658 0.707112 .
87 134.72885 0.001549 0.708661 .
88 149.81224 0.001722 0.710383 .
89 154.70845 0.001778 0.712162 .
90 158.27403 0.001819 0.713981 .
91 143.65598 0.001651 0.715633 .
92 146.10218 0.001680 0.717312 .
93 137.60773 0.001582 0.718894 .
94 139.63687 0.001605 0.720499 .
95 117.10781 0.001346 0.721845 .
96 129.59203 0.001490 0.723335 .
97 147.73530 0.001698 0.725033 .
98 133.94086 0.001540 0.726573 .
99 116.33109 0.001337 0.727910 .
100 132.57216 0.001524 0.729434 .
>= 101 23536.84398 0.270566 1.000000 **********
CSIM MODEL STATISTICS
CPU time used (sec): 0.520
Events processed: 258881
Memory allocated: 355444 bytes
Calls to malloc: 1905
Processes
Started: 50792
Saved: 154812
Terminated: 50000
High water mark: 872
Stacks
Allocated: 50792
High water mark: 52260 words
Average: 59 words
Maximum: 60 words
Current: 47460 words
For gamma = 0.99 bucket size = 10
CSIM Simulation Report (Version 18.1 for Linux x86)
Wed Apr 10 09:03:47 2002
Ending simulation time: 231371.375
Elapsed simulation time: 231371.375
CPU time used (seconds): 1.110
FACILITY SUMMARY
facility service service through- queue response compl
name disc time util. put length time count
------
server fcfs 1.00038 0.432 0.43221 1.41335 3.27009 100000
TABLE 1: cell waiting time for token
minimum 0.000000 mean 0.504955
maximum 13.623006 variance 1.090098
range 13.623006 standard deviation 1.044077
observations 100000 coefficient of var 2.067666
TABLE 2: waiting time in service buffer
minimum 0.000000 mean 2.269704
maximum 32.789223 variance 12.901691
range 32.789223 standard deviation 3.591892
observations 100000 coefficient of var 1.582538
TABLE 3: total time cell spends in the system
minimum 0.000021 mean 3.775041
maximum 35.114970 variance 14.782680
range 35.114949 standard deviation 3.844825
observations 100000 coefficient of var 1.018486
QTABLE 1: cells waiting for token
initial 0 minimum 0 mean 0.218250
final 1 maximum 1 variance 0.170617
entries 100001 range 1 standard deviation 0.413058
exits 100000 coeff of variation 1.892591
cumulative
number total time proportion proportion
0 180874.54290 0.781750 0.781750 ********************
1 50496.83209 0.218250 1.000000 ******
QTABLE 2: cells waiting for service
initial 0 minimum 0 mean 0.980979
final 0 maximum 28 variance 5.843089
entries 100000 range 28 standard deviation 2.417248
exits 100000 coeff of variation 2.464119
cumulative
number total time proportion proportion
0 172304.30454 0.744709 0.744709 ********************
1 17837.26422 0.077094 0.821802 **
2 10520.06807 0.045468 0.867271 *
3 7229.45275 0.031246 0.898517 *
4 5570.02126 0.024074 0.922591 *
5 4254.00952 0.018386 0.940977 .
6 3355.72070 0.014504 0.955481 .
7 2529.09859 0.010931 0.966411 .
8 1875.68714 0.008107 0.974518 .
9 1470.70211 0.006356 0.980875 .
10 1149.88042 0.004970 0.985845 .
11 821.21038 0.003549 0.989394 .
12 594.84359 0.002571 0.991965 .
13 450.85705 0.001949 0.993913 .
14 376.06292 0.001625 0.995539 .
15 282.79902 0.001222 0.996761 .
16 231.99819 0.001003 0.997764 .
17 141.08864 0.000610 0.998374 .
18 103.64453 0.000448 0.998822 .
19 86.24479 0.000373 0.999194 .
20 51.01730 0.000220 0.999415 .
21 34.80688 0.000150 0.999565 .
22 25.76969 0.000111 0.999677 .
23 29.84862 0.000129 0.999806 .
24 18.83480 0.000081 0.999887 .
25 17.30265 0.000075 0.999962 .
26 6.23701 0.000027 0.999989 .
27 2.58222 0.000011 1.000000 .
28 0.01740 0.000000 1.000000 .
CSIM MODEL STATISTICS
CPU time used (sec): 1.110
Events processed: 570594
Memory allocated: 19876 bytes
Calls to malloc: 93
Processes
Started: 100003
Saved: 348634
Terminated: 100000
High water mark: 32
Stacks
Allocated: 100003
High water mark: 1860 words
Average: 59 words
Maximum: 60 words
Current: 120 words
Confidence interval constructed for total times cell spends in the sytem with gamma = 0 , 0.99 and bucket size = 10
Seed values gamma = 0 gamma = 0.99
Z1 Z2 Z3 = Z1 – Z3 square( Z3 – mean)
85 3.415667 3.674095 -0.258428 0.034247
90 3.308318 3.875553 -0.567235 0.014127
75 3.309612 3.846506 -0.536894 0.008724
100 3.323368 3.743993 -0.420625 0.000521
79 3.302374 3.736635 -0.434261 0.000085
mean (Z1-Z3) = - 0.4434886
square(s(n)) = square(Z3- mean)/4 = 0.014426
t value for 4 degrees of freedom for 90% confidence interval = 2.132