Professional Documents
Culture Documents
Art of Computer Systems Performance Analysis Techniques For Experimental Design Measurements Simulation and Modeling
Art of Computer Systems Performance Analysis Techniques For Experimental Design Measurements Simulation and Modeling
for
The Art of Computer
Systems Performance Analysis
Techniques for Experimental Design,
Measurement, Simulation, and Modeling
By
Raj Jain
Professor of CIS
2015 Neil Avenue Mall, 297 Dreese Lab
Columbus, OH 43210-1277
Internet: Jain@Cis.Ohio-State.Edu
For
1.1
2.1 incomplete
2.2 Can be done
3.1
a. Measurements. Run your favourite programs and pick the one that
runs them faster.
b. Use measurements and simulations of various network con guirations.
c. Measurement.
d. (a) Analytical modelling
(b) Analytical modelling and simulations.
(c) Extensive simulations and modelling.
3.2
a.
b.
c.
d.
6
#include <stdio.h>
#define MaxNum 8191
#define NumIterations 10
#define TRUE 1
#define FALSE 0
void main(void)
{
int IsPrimeMaxNum+1]
int i,k,Iteration
int NumPrimes
/* Loop indexes */
/* Number of primes found */
7
} /* of WHILE i*i */
NumPrimes = 0
for (i = 1 i <= MaxNum i++)
/* Count the number of primes */
if (IsPrimei])
NumPrimes = NumPrimes + 1
printf("%d primes\n",NumPrimes)
} /* of for Iterations */
/* The following can be added during debugging to list primes. */
/* for (i = 0 i < MaxNum i++)
if (IsPrimei]) printf("%d\n",i) */
}
5.1
6.1
a.
n
X
tCPU = n1 tCPU = 52
7 = 7:428
i=1
n
X
nI/O = n1 nI=O = 3 178
7 = 454:0
i=1
n
X
b. Normalize the variables to zero mean and unit standard deviation. The
normalized values xs and xr are given by
0
7:428
xs = xss; xs = xs ;4:69
0
xs
r ; 454
xr = xr s; xr = x1009
:3
xr
The normalized values are shown in the fourth and fth columns of
Table b.
The other steps are similar to example 6.1.
0
10
Observation
Variables
No. xs
xr
1 14
2735
2 13
253
3
8
27
4
6
27
5
6
12
6
4
91
7
1
33
P
x 52
3,178
P 2
x 518 7,555,206
Mean 7.42
454.0
Standard 4.69
1009.3
Deviation
Normalized Variables
xs
xr
1.401
2.260
1.188
;0.199
0.122
;0.423
;0.304
;0.423
;0.304
;0.438
;0.731
;0.360
;1.375
;0.450
0.000
0.000
6.000
6.000
0.000
0.000
1.000
1.000
0
Principal Factors
y1
y2
2.589 ;0.607
0.699
0.981
;0.213
0.385
;0.515
0.084
;0.525
0.094
;0.771 ;0.262
;1.264 ;0.674
0.000
0.000
9.970
2.017
0.000
0.000
1.662
0.336
The correlation between CPU time (tCPU ) and number of I/O's (nI/O )
is 0.663. The principal factors y1 and y2 are:
2
3
"
# " 1
# tCPU 7:43
1
y1 = 2
6
7
4:69
1 ; 12 4 nI/O 454:0 5
y2
2
2
;
1009:3
6.2 There is no unique solution to this exercise. Depending upon the choice of
11
Other possibilities are to discard TKB and MAC as outliers, normalize
using the mean and standard deviation, and transform I/O's to a logarithmic
scale. All these and similar alternatives should be considered correct provided
a justi cation is given for the choice.
12
7.1
7.2 Let us choose a network card our computer subsytem. Then the quantities
that can be monitored using the dierent monitors are as follows
13
8.1
a. Those with the largest number of terminal reads/writes per CPU second.
a. Find the average number of disk reads/writes per second of program
X, and the maximum rate that the disk can support. The ratio gives
you the number of copies of program X that can run simultaneously on
the disk drive.
a. Find the mode of typical data recorded by the log and compare that
with data of the benchmark. If they are close, then the benchmark is
representative.
a. I/O bound programs - those with high \disk I/O's per CPU second"
should be chosen for I/O optimization.
14
9.1 incomplete
9.2 incomplete
15
10.1
10.2
10.3 incomplete
10.4 FOM = 73
10.5 FOM = 73
16
1.00
1.28
1.39
Considering the ratio of performance with system A as base, we conclude that system A is better.
Compare the ratio with system A as the base
Benchmark System A System B System
I
0.50
1.00
1.50
J
0.67
1.00
0.33
K
3.00
1.00
2.00
Average
1.39
1.00
1.28
Considering the ratio of performance with system B as base, we conclude that system B is better.
Compare the ratio with system A as the base
Benchmark System A System B System
I
0.33
0.67
1.00
J
2.00
3.00
1.00
K
1.50
0.50
1.00
Average
1.28
1.39
1.00
Considering the ratio of performance with system C as base, we conclude that system C is better.
17
System A
Test Total
Pass % Pass
1
a
ax 100 x
2
b
by 100 y
Total a + b ax + by 100(aax++b by)
System B
Test Total
Pass
% Pass
1
c
cu
100 u
2
d
dv
100 v
100(
Total c + d cu + dv 100 ccu++d dv)
18
12.1
12.4 From 12.3, we know that the mean and variance of a Poisson distribution
with pmf (1 ; p)x 1p are equal to . x and y are independent random
variables.
;
19
12.5
pdf = f (x) = dFdx(x)
x=a "mX1 (x=a)i #
e
= a
;e
i=0 i!
;
m 1 x=a
= (xm ; e1)!am
;
Mean = =
xf (x)dx
Z
xm e x=a dx
=
0 (m ; 1)!am
Z
1
= (m ; 1)!am xm e
0
1
Integrating by parts
"m 2
i#
x=a X (x=a)
i=0 a i!
x=a dx
h
i
1
am Z xm 1 e
m e x=a +
;
ax
0
(m ; 1)!am Z
(m ; 1)!am 0
am
m 1 e x=a dx
=
x
m
(m ; 1)!a 0
am m! Z e x=a dx
=
(mZ ; 1)!am 0
= m e x=a dx
x=a dx
0h
= am ;e x=a 0
= am0 ; (;1)]
= am
Variance = 2
(x ; )2f (x)dx
Z
= (m ;11)!am (x ; am)2 xm 1 e x=a dx
0
Z
= (m ;11)!am (xm+1 ; 2amxm + a2 m2xm 1 )e
=
x=a dx
20
2 (m + 1)m ; 2a2 m2 + a2 m2 Z
a
=
xm 1 e
(m ; 1)!am
0
= a2 m
1
x=a dx
a2 m = p1
C.O.V = = am
m
12.6
pdf = f (x) = dFdx(x)
(a+1)
= ax
Z
Mean = =
xf (x)dx
;
ax a dx
a+1 #
x
= a
(;a + 1) 1
a
= a;1
=
Variance = 2
Z1
1"
Z1
(x ; )2f (x)dx
=
(x ; a )2ax (a+1) dx
a;1
1
=
Integrating by parts
21
=
=
=
=
=
"
Z
a
x
a
2
a (x ; a ; 1 ) ;a ; 2 (x ; a ;a 1 )x a dx
1
1
"
#
1 ; 2 (x ; a ) x a+1 + 2 Z x
(a ; 1)2
a ; 1 ;a + 1 1 ;a + 1 1
"
#
1 ; 2 + 2
x a+2
(a ; 1)2 (a ; 1)2 ;a + 1 ;a + 2 1
2
;1
+
(a ; 1)2 (a ; 1)(a ; 2)
2a ; 2 ; a + 2
(a ; 1)2(a ; 2)
;
= (a ; 1)a2(a ; 2)
s
C.O.V = = (a ; 1)a2(a ; 2) a ;a 1
= q 1
a(a ; 2)
= a(a ; 2)] 21
a+1 dx
22
x
1
2
3
4
5
6
7
8
Total
f(x)
0.000134
0.004431
0.053991
0.241971
0.398942
0.241971
0.053991
0.004431
0.999862
12.8
12.9
23
d. Number of peripherals is skewed, so the Median is a good choice.
e. Using the same logic as for memory size and number of peripherals, we
choose the Median.
12.10 Since the ratio of maximum to minimum is very high, use the median. The
12.11 Arithmetic mean since the data is very clustered together (not skewed) and
ymax=ymin ratio is small.
element = 14 90-percentile = 1 + (32)(0.9)] = 30th element = 38 SemiInterquartile Range(SIQR) = Q3 2 Q1 Q 1 = 9th element = 21 Q 3 = 25th
element = 34 SIQR = 7/2 a= 3.5 Coecient of Variation = 0.35
Use the coecient of variation (or standard deviation) since the data
is not skewed.
;
12.14 The normal quantile-quantile plot for this data is shown in Figure 20.2 of
the book. From the plot, the errors do appear to be normally distributed.
24
13.1 The normal distribution has the linearity property. Hence, the means get
added, when sum of two normal distribution are taken. The variance is given
by
s
2
2
= n1 + n2
1
a. From central limit theorem N ( = n) is the distributionpof the sample means. Here = 1. Hence the distribution is N( 1= n)
q
13.2 The numbers in the sorted order is f 9, 11, 13, 14, 15, 15, 16, 19, 21, 23, 23,
23, 23, 24, 24, 25, 28, 28, 29, 31, 33, 33, 34, 34, 34, 35, 35, 36, 36, 38, 39, 42,
45g. There are n = 33 numbers.
25
b. Mean = 1=33 P33
i=1 xi = 888=33 = 26:91
p
c. s2 = n 1 1 Pni=1(xi ; x)2 = 90:1477. There s = 90:1477 = 9:4946.
p
A 90% con dence interval for the mean = 26:91(1:645)(9:4946)= 33
= (24:19 29:63)
d. Number of programs with less than or equal 25 I/O's = 19. Fraction
= 19=33 = 0:485.
;
26
developed as follows
For this data:
n = 7, !xy = 3375, !x = 66, !x2 = 828, !y = 271, !y2 = 13 855, x = 9:43,
y = 38:71. Therefore,
; nxy
3375 ; 7 9:43 38:71 = 3:9886
b1 = !!xxy
=
2 ; n(
x)2
828 ; 7 (9:43)2
b0 = y ; b1 x = 38:71 ; 3:9886 9:43 = 1:0975
The desired model is
Number of disk I/O's = 1:0975 + 3:9886(CPU time)
SSE = !y2 ; b0 !y ; b1 !xy = 13 855 ; 1:0975 271 ; 3:9886 3375 = 126:05
"
1=2
1= 2
2
2
1
x
1
(9
:
43)
sb0 = se n + !x2 ; nx2 = 5:021 7 + 828 ; 7 9:43 9:43 = 3:8091
5:021
sb1 = 2 se 2 1=2 =
= 0:3502
!x ; nx ]
828 ; 7 9:43 9:43]1=2
27
The 90% con dence interval for b0 is
1:0975 (2:015)(3:8091) = 1:0975 7:6753 = (;6:5778 8:7728)
Since this includes zero b0 is not signi cant.
The 90% con dence interval for b0 is
3:9886 (2:015)(0:3502) = 3:9886 0:7057 = (3:2829 4:6943)
a. Only b1 is signi cant.
b. 96% (xxx answer in book is wrong it said 97
c. yexpected = 1:0975 + 3:9886 40 = 160:6415
d.
#1=2
(40
; 9:43)2
1
sy^1p = 5:021 1 + 7 + 828 ; 7(9:43)2 = 11:9768
"
The 90% con dence interval for a single prediction = 160:6415 (2:015)(11:9768)
= 160:6415 24:1333
= (136:50 184:77)
e.
#1=2
1
(40
; 9:43)2
sy^1p = 5:021 7 + 828 ; 7(9:43)2 = 10:8735
The 90% con dence interval for predicted mean = 160:6415 (2:015)(10:8735)
= 160:6415 21:9101
= (138:73 182:55)
(xxx answer in book is wrong (141.45, 179.66) )
28
n = 7, !xy = 16 388, !x = 1324, !x2 = 326 686, !y = 66, !y2 = 828,
x = 189:14, y = 9:43. Therefore,
16 388 ; 7 189:14 9:43 = 0:0512
; nxy
=
b1 = !!xxy
2 ; n(
2
x)
326 686 ; 7 (189:14)2
b0 = y ; b1 x = 9:43 ; 0:0512 189:14 = ;0:254
The desired model is
CPU time in milliseconds = ;0:254 + 0:0512 (memory size in kilobytes)
14.4 Elasped time = 0.196 (number of days) + 0.511 the 90% con dence intervals
for the regression coecients are (0.36, 0.66) for the intercept and (0.18,
0.21) for the slope both are signi cant. (Note: Calculations are similar to
the solution for exercise 14.2)
14.6 Number of disk I/O's = 13.494 + 1.634 (number of keys) R2 = 0:846 the
90% con dence intervals for the coecients are (;35.627, 27.877) and (2.78,
10.47) b0 is not signi cant. (Note: Calculations are similar to the solution
for exercise 14.2)
are signi cant. However, the scatter plot of the data shows a nonlinear
relationship. The residuals versus predicted estimates show that the errors
have a parabolic trend. This indicates that the errors are not independent
of the predictor variables and so either other predictor variables or some
nonlinear terms of current predictors need to be included in the model.
29
15.1 (yyy question not clear, no x5 , but solution talks about x5 !?)
a. R = 0:95 R2 = 0:9025. So 90.25% of variance is explained by the
regression.
b. Yes
c. x5
d. x1
e. x2 , x3 , and x4
f. Multicollinearity possible
g. Compute correlation among predictors and reduce the number of predictors.
Table 15.1: Time to Encrypt a k-bit Record (after log tranformation)
log2(k) Uniprocessor Multiprocessor
2.107
1.968
1.826
15.2 2.408
2.679
2.550
2.709
3.532
3.371
3.010
4.405
4.231
Let us use the following model:
y = b0 + b1 x1 + b2 x2
where y is log(time), x1 is the key size and x2 is a binary variable.
x2 = 1 ) multiprocessor and x2 = 0 )uniprocessor
In this case:
3
2
1 2:107 0
6 1 2:408 0 7
7
6
7
6
6 1 2:709 0 7
7
6
6 1 3:010 0 7
6
X = 66 1 2:107 1 777
7
6
6 1 2:408 1 7
7
6
7
6
4 1 2:709 1 5
1 3:010 1
30
2
8 20:468
4
6
T
X X = 4 20:468 53:273 10:234 75
4 10:234
4
2
3
7:475 ;2:824 ;0:25
0 75
C = (XTX) 1 = 64 ;2:824 1:104
;0:25
0
0:5
2
3
24:562
6
T
X y = 4 65:280 75
11:978
The regression parameters are:
b = (XTX) 1XTy = (;3:739 2:691 ;0:152)T
;
31
(xxx answer in book is wrong. The answers for (b) and (c) are interchanged)
32
B
;1
;1
1
1
;1
;1
1
1
;105
;13.125
C
;1
;1
;1
;1
1
1
1
1
;175
;21.875
AB AC
BC ABC
y
1
1
1 ;1
100
;1
;1
1
1
120
;1
1
;1
1
40
1 ;1
;1
;1
401
1 ;1
;1
1
15
;1
1
;1
;1
10
;1
;1
1 ;1
30
1
1
1
1
50
;15
15
215
65 Total
;1.875 1.875 26.875 8.125 Total/8
2 + q2 + q2 + q2 )
23 (qA2 + qB2 + qC2 + qAB
AC
BC
ABC
8(1:8752 + 13:1252 + 21:8752 + 1:8752 + 1:8752 + 26:8752 + 8:1252)
28:125 + 1378:125 + 3570:125 + 28:125 + 28:125 + 5778:125 + 528:125
11597:025
33
;1
;1
;1
1
;1
1
1
1
;3.577 17.857
;0.894 4.464
AB
y Mean y
1 (41.16, 39.02, 42.56) 40.913
;1
(51.50,52.50,50.50) 51.500
;1
(63.17,59.25,64.23) 62.217
1 (48.08,48.98,47.10) 48.053
-24.751
Total
-6.188
Total/4
The eects are 50.67, 4.46, ;0:89, and ;6.19. The eect of workloads
(;0.89) is not signi cant. Interactions explain 62.67% of the variation.
34
19.1 The following sign table with I = ACD as the generator polynomial is used
to analyze the 24 1 design.
;
I
A
B
1
;1
;1
1
1 ;1
1
;1
1
1
1
1
1
;1
;1
1
1 ;1
1
;1
1
1
1
1
385
215
15
48.125 26.875 1.875
C AB
;1
1
;1
;1
;1
;1
;1
1
1
1
1 ;1
1 ;1
1
1
;175
65
;21.875 8.125
D BC
1
1
;1
1
1 ;1
;1
;1
;1
;1
1 ;1
;1
1
1
1
;105
15
;13.125 1.875
BD
y
;1
40
1
100
1
20
;1
120
1
15
;1
30
;1
10
1
50
;15
Total
;1.875 Total/8
35
r X
a
X
i=1 k=1
aikj yik
We know that
i=1 k=1
r X
a
X
i=1i=j k=1
yik
ra
k=j
Otherwise
e2j = e2
2
ej
r X
a
X
aikj
i
=1
k
=1
"
2
1
1
+ (ar ; r)
r ;
2
1
2
=
r ra
ra e
1
1
2
2
=
2 (a ; 1) + ra2 (a ; 1) e
ra
"
#
(
a
; 1)
=
((
a
; 1) + 1) e2
2
ra
2
= (a ;ar1)e
36
Table 21.2: Computation of Eects for the Scheme versus Spectrum Study
Workload
Scheme86 Spect125 Spect62.5
Garbage Collection
39.97
99.06
56.24
Pattern Match
0.958
1.672
1.252
Bignum Addition
0.01910 0.03175 0.01844
Bignum Multiplication
0.256
0.423
0.236
Fast Fourier Transform (1024)
10.21
20.28
10.14
Column Sum
51.413 121.467 67.88644
Column Mean
10.283
24.293
13.577
Column eect
;5.768
8.242
;2.474
Row Row
Sum Mean
195.27 65.09
3.882 1.294
0.0693 0.0231
0.915 0.305
40.63 13.543
240.766
16.051
Ro
Ee
49.0
;14.7
;16.0
;15.7
;2.5
21.1 The computation of eects for Scheme versus Spectrum study is given in
table 21.2
SSY =
X 2
y
ij
ij
= 15 197:347
2 = 3 5 (16:051)2 = 3 864:519
SS0 = ab
X 2
SSA = b j = 5 (;5:768)2 + (8:242)2 + (;2:474)2] = 536:605
SSB =
X
a 2
= 9 401:242
SST = SSY ; SS0 = 15 197:347 ; 3 864:519 = 11 332:828
SSE = SST ; SSA ; SSB = 11 332:828 ; 536:605 ; 9 401:242 = 1394:981
The dierences of the eects of dierent processors are ;5:768;8:242 =
and 8:242 + 2:474 = 10:716.
MSE = (a ; SSE
1)(b ; 1)
1394:981 = 139:498
MSE = (5 ;
1)(3 ; 1)
p
p
se = MSE = 139:498 = 11:811
37
Table 21.3: Computation of Eects the Intel iAPX 432 Study
System
No.
1
2
3
4
5
6
7
8
9
10
11
12
Column Sum
Column Mean
Column Eect
484
0.146
0.204
0.146
0.672
0.724
0.763
0.114
0.176
0.863
1.544
1.152
1.206
7.718
0.643
;2.416
Workload
Row Row
Sieve Puzzle Acker
Sum Mean
2.398 3.973 3.663 10.180 2.545
2.342 4.076 3.892 10.514 2.626
2.413 4.062 3.993 10.615 2.654
2.869 4.569 3.892 12.003 3.001
810.0 4.511 4.060 12.204 3.051
2.982 4.512 4.091 12.348 3.087
2.292 3.963 3.439 9.808 2.452
2.391 3.964 3.489 10.019 2.505
2.884 4.643 4.045 12.436 3.109
3.505 5.544 5.414 16.008 4.002
3.505 5.217 5.414 15.290 3.822
3.505 5.255 5.414 15.382 3.8455
33.996 54.290 50.809 146.813
2.833 4.524 4.234
3.059
;0.226
1.465 1.175
Row
Eect
;0.5140
;0.4304
;0.4053
;0.0583
;0.0079
0.0281
;0.6069
;0.5541
0.0499
0.9430
0.7634
0.7865
21.2 The table after the log transformation is shown in table 21.3.
The ANOVA for Scheme versus Spectrum study is given in table 21.4,
which agrees with the table 21.19 given in the book.
38
Table 21.4: ANOVA Table for the Intel iAPX 432 Study
Compo- Sum of %Variation DF Mean
FFnent
Squares
Square Comp. Table
y
576.639
y::
449.159
y ; y::
127.625
100.0% 47
Workload 112.979
88.5% 3
37.7 1158.5
2.3
System
12.991
10.2% 11
1.2
37.9
1.8
Errors
1.07 p 0.8%p 33
0.03
se = MSE = 0:03 = 0:18
21.3 After logarithmic transformation, the table for computing eects is shown
in table 21.5.
The ANOVA table for RISC Code size study is given in table 21.6.
The con dence intervals for eect dierences are shown in table 21.7.
21.4 After log transformation, the table for computing eects (including 68000
39
Table 21.5: Computation of Eects for the RISC Code Size Study
Processors
Row Row
Workload
RISC-I Z8002 VAX-11/780 PDP-11/70 C/70 Sum Mean
E-String Search
2.16 2.11
2.00
2.06 2.00 10.34 2.07
F-Bit Test
2.08 2.26
2.16
2.23 2.08 10.80 2.16
H-Linked List
2.25 2.15
2.32
2.48 2.15 11.34 2.27
K-Bit Matrix
2.46 2.57
2.46
2.57 2.50 12.57 2.51
I-Quick Sort
3.00 3.04
2.95
3.04 2.95 14.97 2.99
Ackermann(3,6)
2.16 2.48
1.86
1.93 1.93 10.36 2.07
Recursive Qsort
3.44 3.14
3.14
3.22 3.22 16.14 3.23
Puzzle (Subscript)
3.45 3.15
3.15
3.15 3.22 16.11 3.22
Puzzle (Pointer)
2.88 2.78
2.65
2.58 2.58 13.46 2.69
SED (Batch Editor) 4.25 4.25
4.03
3.95 3.95 20.42 4.08
Towers Hanoi (18)
1.98 2.38
1.89
1.98 1.83 10.06 2.01
Column Sum
30.09 30.30
38.60
29.17 28.41 146.57
Column Mean
2.74 2.75
2.60
2.65 2.58
2.66
Column Eect
0.07 0.09
;0.06
;0.01 ;0.08
Row
Eect
;0.60 2
;0.51
;0.40
;0.15
0.33
;0.59
0.57
0.56
0.03
1.42
;0.65
40
Table 21.7: Con dence Intervals of Eect Dierences in the RISC Code Size
Study
RISC-I
Z8002
VAX-11/780
PDP-11/70
RISC-I
Table 21.8: Computation of Eects for the RISC Code Size Study
Processors
Row Row
Workload
RISC-I 68000 Z8002 11/780 11/70 C/70 Sum Mean
E-String Search
2.16 2.06 2.11 2.00 2.06 2.00 12.40 2.07
F-Bit Test
2.08 2.16 2.26 2.16 2.23 2.08 12.96 2.16
H-Linked List
2.25 2.09 2.15 2.32 2.48 2.15 13.43 2.24
K-Bit Matrix
2.46 2.50 2.57 2.46 2.57 2.50 15.07 2.51
I-Quick Sort
3.00 2.84 3.04 2.95 3.04 2.95 17.82 2.97
Ackermann(3,6)
2.16 0.00 2.48 1.86 1.93 1.93 10.36 2.07
Recursive Qsort
3.44 0.00 3.14 3.14 3.22 3.22 16.14 3.23
Puzzle (Subscript)
3.45 3.40 3.15 3.15 3.15 3.22 19.51 3.25
Puzzle (Pointer)
2.88 0.00 2.78 2.65 2.58 2.58 13.46 2.69
SED (Batch Editor)
4.25 0.00 4.25 4.03 3.95 3.95 20.42 4.08
Towers Hanoi (18)
1.98 0.00 2.38 1.89 1.98 1.83 10.06 2.01
Column Sum
30.09 15.05 30.30 38.60 29.17 28.41 161.62
Column Mean
2.74 2.51 2.75 2.60 2.65 2.58
2.65
Column Eect
0.09 ;0.14 0.10 ;0.05 ;0.00 ;0.07
E
;0
;
;
;
41
Table 21.10: Con dence Intervals of Eect Dierences in the RISC Code Size
Study
6800
Z8002
11/780
11/70
C/70
RISC-I (0.13,0.32) (;0.11,0.07)y
(0.04, 0.23) (;0.01,0.18)y
(0.06, 0.25)
68000
(;0.34, ;0.15) (;0.19, 0.00)y (;0.24, ;0.05) (;0.17, 0.02)y
Z8002
(0.06, 0.25)
(0.01, 0.20)
(0.08, 0.27)
11/780
(;0.15,0.04)y (;0.08, 0.11)y
11/70
(;0.02, 0.16)y
y ) Not signi cant
42
Table 22.11: Computation of Eects for exercise 22.1
A
Row
Row
Sum Mean
B
A1
A2
A3
B1
3200.0 5120.0 8900.0 51660.0 5740.0
B2
4700.0 9400.0 19740.0 101520.0 11280.0
B3
3200.0 4160.0 7360.0 44160.0 4906.7
B4
5100.0 5610.0 22440.0 99450.0 11050.0
B5
6800.0 12240.0 28560.0 142800.0 15866.7
Column Sum 23000.0 36530.0 87000.0 146530.0
9768.7
Column Mean 4600.0 7306.0 17400.0
Column eect ;5168.7 ;2462.7 7631.3
B
B1
B2
B3
B4
B5
Row
Eect
;4028.7
1511.3
;4862.0
1281.3
6098.0
22.1 The table for computing eects is given in table 22.11. The interactions are
given in table 22.12. The Analysis of Variance table is given table 22.13.
The 90% con dence intervals for eects are given in table 22.14. The 90%
con dence intervals for the interactions are given in table 22.15. The 90%
con dence intervals for the eect dierences are given in table 22.16.
a. Yes. All processors are signi cantly dierent from each other.
b. 16.8%
c. All eects and interactions are signi cant.
43
Sum of %Variation DF
Mean
FFSquares
Square Comp. Table
6810978816
4294208256
2516770560
100.0% 44
1365256448
54.2% 2 682628224 109924.0
2.5
728826816
29.0% 4 182206704 29340.9
2.1
422501056
16.8% 8 52812632 8504.4
1.9
186300 p
0.0%
30
6210
p
se = MSE = 6210 = 78:80
44
B
B1
B2
B3
B4
B5
45
46
24.1
24.2
24.3 The unit time approach is a time-advancing mechanism to adjust the simulation clock. In this approach the time is incremeneted in small intervals
and checks are done at each increment to see if there are any events which
have to be scheduled. This approach is generally not used, since unnecessary
increments and checks are done during idle time.
47
25.1
a. This is expected when the system is underloaded. Make sure that the
system is in underloaded region
b. This is quite common when the system is overloaded. Make sure that
the system is in overloaded region
c. This is expected.
d. This is uncommon and would require validation.
e. This is rare and would require serious validation eort.
25.2 The transient interval using the truncation method is 1, since 4 is neither
the maximum nor the minimum of the remaining observations. However,
this is incorrect, since the actual transient interval seems to be 6.
48
26.2 The values of 24n mod 31 for n = 1 : : : 30 are 24, 18, 29, 14, 26, 4, 3, 10,
23, 25, 11, 16, 12, 9, 30, 7, 13, 2, 17, 5, 27, 28, 21, 8, 6, 20, 15, 19, 22, 1. The
smallest n that results in 1 is 30. Yes, 24 is a primitive root of 31.
26.3 2, 6, 7, 8
26.4 1155
26.5 x10000 = 1,919,456,777
26.6
q = m div a = 31 div 11 = 2
r = m mod a = 31 mod 11 = 9
No, the seqence generated with and without Schrage method are dierent.
Since, q = 2 and r = 9 do not satisfy the condition r less than q.
26.7
q = m div a = 31 div 24 = 1
r = m mod a = 31 mod 24 = 7
Since, q = 1 and r = 7 do not satisfy the condition r < q, this cannot be
implemented using Schrage's method.
26.8
a. Primitive
b. Primitive
c. Not primitive. Since (1 + x2 + x4 )(1 ; x2 ) = 1 ; x6 .
d. Primitive
26.9
a. 21.
b. 9. Since (x3 ; 1)(x6 + x + 1) = x9 ; 1
49
Step1:
Step2:
Step3:
Step4:
Step5:
101000
010100
111100
000000
111100
111100
011110
100010
000000
100010
c. 63.
d. 45. Since (x3 0 + x1 5 + 1)(x1 5 ; 1) = x4 5 ; 1
q ; r = 5. We need a 1-bit right shift and 5-bit left shift. The initial seed is
X = 111111.
The sequence of calculations are show in table 26.17. Hence the rst
ve 6-bit numbers are 0:0000012, 0:0000112, 0:0001012, 0:0011112, 0:0100012.
50
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Decimal
24
323
4,210
54,741
56,284
10,807
9,430
57,065
20,960
10,347
3,450
44,861
58,916
45,023
61,022
6,865
23,720
46,227
11,138
13,733
00000000
00000001
00010000
11010101
11011011
00101010
00100100
11011110
01010001
00101000
00001101
10101111
11100110
10101111
11101110
00011010
01011100
10110100
00101011
00110101
Binary
00011000
01000011
01110010
11010101
11011100
00110111
11010110
11101001
11100000
01101011
01111010
00111101
00100100
11011111
01011110
11010001
10101000
10010011
10000010
10100101
51
27.1 The nal seed value is 1043618065 The nal random number is 0.4859725
Table 27.19: Chi-Square Test on 10,000 Numbers
Expected)2
Cell Observed Expected (Observed
Expected
1
993
1000.0
0.049
2
1007
1000.0
0.049
3
998
1000.0
0.004
4
958
1000.0
1.764
5
1001
1000.0
0.001
6
1049
1000.0
2.401
7
989
1000.0
0.121
8
963
1000.0
1.369
9
1026
1000.0
0.676
10
1016
1000.0
0.256
Total
10000 10000.0
6.690
;
27.2 Fifteen random numbers generated using the given LCG are 6, 15, 12, 13,
52
Table 27.20: Computation for the K-S Test
j
xj nj ; xj xj ; j n 1
1 0.00000 0.06667 0.00000
2 0.12500 0.00833 0.05833
3 0.18750 0.01250 0.05417
4 0.25000 0.01667 0.05000
5 0.31250 0.02083 0.04583
6 0.37500 0.02500 0.04167
7 0.43750 0.02917 0.03750
8 0.50000 0.03333 0.03333
9 0.56250 0.03750 0.02917
10 0.62500 0.04167 0.02500
11 0.68750 0.04583 0.02083
12 0.75000 0.05000 0.01667
13 0.81250 0.05417 0.01250
14 0.87500 0.05833 0.00833
15 0.93750 0.06250 0.00417
Max 0.06667 0.05833
;
Table 27.21: Autocovariances for the Random Sequence for exercise 27.3
Lag Autocovariance St. Dev. 90% Con dence Interval
k
Rk
of Rk Lower Limit Upper Limit
p
1
-0.001696 0.000833
-0.002763 -0.000629
2
0.000429 0.000833
-0.000638
0.001495
3
-0.000039 0.000833
-0.001105
0.001028
4
-0.000221 0.000834
-0.001287
0.000846
p
5
0.001335 0.000834
0.000268 0.002402
6
-0.000420 0.000834
-0.001487
0.000647
7
0.000856 0.000834
-0.000211
0.001923
8
0.000630 0.000834
-0.000437
0.001698
p
9
-0.001105 0.000834
-0.002172 -0.000037
10
0.000964 0.000834
-0.000103
0.002032
53
27.3 The autocovariance and con dence intervals for the serial autocovariances
27.4 The pairs generated by the rst generator lie on the following two lines with
a positive slope:
xn = 12 xn 1 + 13
k k = 0 1
2
p
The distance between the lines is 13= 5. The pairs generated by the second
generator lie on the following two lines with a negative slope:
;
xn = ;2xn 1 + 13k k = 1 2
;
The distance between the lines is 13= 5. Both generators have the same
2-distributivity.
54
28.1
55
29.1
a. Geometric. Geometric distribution is used to model number of attempts between successive failures.
b. Negative binomial. It can be used model the numberof failures before
the mth success.
c. Logistic. (??) (xxx)
d. Normal. The mean of large set of uniform distribution is a normal
distribution.
e. Lognormal. The product of large set of uniform is a lognormal distribution.
f. Pareto. This is used t power curves.
g. Poisson. Sum of two Poisson's is a Poisson distribution.
h. Chi square. Variances of normal population has chi-square distribution.
i. F . Ratio of variances of normal population has F distribution.
j. Exponential. Exponential is used to model memoryless events.
k. Erlang-m. Sum m memoryless servers can be represented by Erlang-m
distribution..
l. Binomial. This models the successes in n independent and identical
Bernoulli trails.
m. Beta. This is used to model ratio of random-variates.
29.2
56
c. Ratio of two chi-square variates is a F distribution. Since both numerator and denominator have two variates the degrees of freedom is 2 for
both. Hence it is a F (2, 2) distribution. 90% quantile is 9.00 from
appendix A.6.
d. Ratio of normal to square root of chi-square distribution is a t distinction. Number of degrees of freedom is 3. Hence it is a t(3) distribution.
90% is 1.638 from appendix A.4.
57
30.1 Erlang-k arrivals, general bulk service, ve servers, 300 waiting positions,
5000 population size, and last come rst served preemptive resume service.
since there are 12 servers and only 10 waiting positions, two servers have no
waiting positions.
30.3 Both will provide the same performance. Increasing buers beyond the
population size has no eect.
58
31.1
and = . Therefore
Here n = n+1
n
n
pn =
n! p0 where
=
p0 = e
c.
E n] =
X
1
n=1
npn = p0
X
1
n=1
n n!
E n] = e
e =
;
d. = (1 ; e )
0
31.2
59
d. Varn] = E n2 ] ; (E n])2 = Pn=1 n2 nn! p0 ;
2 = e
(
+ 1)e ;
2
Varn] =
1
e. E r] = En] = 1
31.4 a. = m = 3
30
(1=0:05)
= 0:5
b. p0 = 0:21 3
(3 0:5) 0:21 = 0:24
c. % = 3!(1
0:5)
d. E n] = 3 0:5 + 0:5 0:24=(1 ; 0:5) = 1:74
e. E nq ] = 0:5 0:24=(1; 0:5) = 0:24
f. E r] = 201 1 + 3(10:240:5) = 0:0579 second
g. Varr] = 0:00296 second2 (use forumla 14 of Box 31.2)
h. w90 = 0:0287 second (use formula 19 of Box 31.2)
b. p0 =
= 0:50
c. % = 0:50
d. E n] = 1 0:05:5 = 1 request per drive
e. E nq ] = 10:502:5 = 0:5 request per drive
f. E r] = 11=20
0:5 = 02:1 second
g. Varr] = (E r]) = 0:1 0:1 = 0:01 second2
h. w90 = 0:16 second (use formula 20 of Box 31.1)
;
31.6 Yes. With the new system, the 90-percentile of the waiting time will be zero.
31.7 Yes, since with = 0:167=2 = 0:0833, average waiting time is 0.18 minutes
and the 90-percentile of waiting time is zero.
60
8
!
>
K
>
n
>
>
< p0 (m
)
!n
pn = >
>
n! m
> p0
n K
>
:
n m! m
0n<m
mnK
where
= m
Average0 throughput = PKn=01(K ; n)pn = (K ; E n])
=
(K ; E n])
U = m
E r] = En0 ] = (KEnE]n])
;
8
>
>
>
>
<
pn = >
>
>
>
:
K (m
)np 0 n < m
0
n !
31.10
K n!()n mm p m n B
0
m!
n
.
where,
= m
Average throughput = PBn=0(K ; n)pn = (K ; E n] ; (K ; B )pB )
where 0pB is the probability of B jobs in the system.
=
(K ; E n] ; (K ; B )p )
U = m
B
E
n
]
E
n
]
E r] = 0 = (K En] (K B)pB)
0
61
32.1
62
33.6 (xxx The data used here looks like that from problem 34.1) a. CPU (since
63
64
the response time is R = (n + h)S . Arguing similarily the throughput is
X = (n+nh)S . Power X=R = (n+hn)2 S2 is maximum when (n + h)2 ; 2(n + h)n =
0)n=h
N
1)
5 + 1:7 + (N ; 1)0:57 1:17(:7(NN 1)+5
;
N
X (N ) min 1
:7
5 + 1:7 + (N ; 1) 1:17+5
:7
max N ; 5 1:7 + (N ; 1) 1:71:+7 5 R(N ) 1:7+(N ;1)0:57 (N(N; ;1)11)1
:7 + 5
N
1
2
3
4
5
6
7
8
9
10
34.7
Response Time
Lower
Upper
BJB MVA BJB
1.700 1.700 1.700
1.844 1.904 1.954
1.988 2.149 2.510
2.131 2.443 3.215
2.275 2.795 4.005
2.419 3.213 4.848
2.563 3.706 5.726
3.000 4.278 6.629
4.000 4.930 7.549
5.000 5.658 8.483
Throughput
Lower
Upper
BJB MVA BJB
0.149 0.149 0.149
0.288 0.290 0.292
0.399 0.420 0.429
0.487 0.537 0.561
0.555 0.641 0.687
0.609 0.731 0.809
0.653 0.804 0.926
0.688 0.862 1.000
0.717 0.906 1.000
0.742 0.938 1.000
D(M +N 1)
a. X = D(1+NN ;1 ) = D(MNM
+N 1) , R = Q=X = N=X =
M
;
65
Table 35.22: Computing the Normalizing Constant for Exercise 35.1
n yCPU = 10 yA = 6 yB = 1
0
1
1
1
1
10
16
17
2
100
196
197
3
1000 2176 2177
66
67
36.1 (xxx answer depends on data of Exercise 35.1) X = 0.588, 0.796, and 0.892
for N = 1, 2, 3, respectively R = 1.700, 2.506, 3.365 for N = 1, 2, 3,
respectively.
36.2 (xxx answer depends on data of Exercise 35.1) The service rates of the FEC
are 1.429, 1.628, and 1.660, respectively, for one through three jobs at the
service center.