Sie sind auf Seite 1von 10

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

Advanced Systems Lab Exercises From the Book


Aus VISki

Inhaltsverzeichnis
1 Recommended Exercises from the Book 1.1 1.1 1.2 12.1 1.3 12.7 1.4 13.2 1.5 14.2 1.6 14.3 1.7 16.1 1.8 17.1 1.9 18.1 1.10 30.3 1.11 30.4 1.12 31.1 1.13 31.2 1.14 31.3 1.15 31.4 1.16 33.1 1.17 33.2 1.18 33.3 1.19 33.5 2 Errata

Recommended Exercises from the Book


R. Jain: The Art of Computer Systems Performance Analysis, Wiley.

1.1
The measured performance of two database systems on two different work-loads is shown in Table 1.6. Compare the performance of the two systems and show that a. System A is better. b. System B is better. TABLE 1.6 Throughput in Queries per Second

Workload 1 Workload 2 A 10 30

1 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

B 30

10

Solution: a.

Workload 1 Workload 2 Average A 33% B 100% 300% 100% 166.5% 100%

b.

Workload 1 Workload 2 Average A 100% B 33% 100% 300% 100% 166.5%

--Kermit 14:29, 22. Jan. 2011 (CET)

12.1
A distributed system has three file servers, which are chosen independently and with equal probabilities whenever a new file is created. The servers are named A, B, and C. Determine the probabilities of the following events: a. Server A is selected b. Server A or B is selected c. Servers A and B are selected d. Server A is not selected e. Server A is selected twice in a row f. Server selection sequence ABCABCABC is observed (in nine successive file creations) Solution: a. P(A) = 0.33 b. P(AB) = 0.66 c. P(AB) = 0 (because they are never selected at the same time) d. P(A) = P(BC) = 0.66 e. P(AA) = 0.33 * 0.33 = 0.1089 f. P(ABCABCABC) = 0.33 = 4.6411e-05 --Kermit 17:45, 22. Jan. 2011 (CET)

12.7
The execution times of queries on a database is normally distributed with a mean of 5 seconds and a standard deviation of 1 second. Determine the following: a. What is the probability of the execution time being more than 8 seconds? b. What is the probability of the execution time being less than 6 seconds? c. What percentage of responses will take between 4 and 7 seconds?

2 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

d. What is the 95-percentile execution time? Solution: Wikipedia: standard deviation (http://en.wikipedia.org /wiki/Standard_distribution#Cumulative_distribution_function) a. b. c.

d. 95% of the execution times are between 3.04s and 6.96s. --Kermit 11:18, 23. Jan. 2011 (CET)

13.2
Answer the following for the data of Exercise 12.11: a. What is the 10-percentile and 90-percentile from the sample? b. What is the mean number of disk I/Os per program? c. What is the 90% confidence interval for the mean? d. What fraction of programs make less than or equal to 25 I/Os and what is the 90% confidence interval for the fraction? e. What is the one-sided 90% confidence interval for the mean? Data: {23, 33, 14, 15, 42, 28, 33, 45, 23, 34, 39, 21, 36, 23, 34, 36, 25, 9, 11, 19, 35, 24, 31, 29, 16, 23, 34, 24, 38, 15, 13, 35, 28} Sorted Data: {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, 45} Solution: a. round( (n-1)*(p/100) + 1 )th element from sorted sequence. 10-percentile > 4th element > 14 90-percentile > 30th element > 38 b. have fun doing this manually... wolfram alpha says 26.91 c. the formula to calculate CI: looking up t in students t-distribution, value is for N=30 (for 2-sided CI it is one to the right in the book (wikipedia is more clear on that))

the values are slightly off from the master solution d. p:=16/33=0.485 = 0.1,s = 9.49,n = 33 CI= e. see c. for e formula:

3 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

CI=26.91-1.31*(9.495/sqrt(33))=(24.7;26.91) or CI=26.91+1.31*(9.495/sqrt(33))=(26.91;29.08) again slightly off. --Kermit 12:15, 23. Jan. 2011 (CET)

14.2
For the disk I/O and CPU data in Example 14.1, find a linear formula to predict the number of disk I/Os given the CPU time. Answer the following questions about this regression: a. Which parameters are significant? b. What percentage of variation is explained by the regression? c. What is the expected number of disk I/Os for a program with a CPU time of 40 milliseconds? d. What bounds would you put on your answer in c if you wanted to take less than 10% chance of error on a single program to be measured tomorrow? e. Repeat d for the case that you want to take a less than 10% chance of error on the mean of a large number of programs to be measured tomorrow? Data: {(14, 2), (16, 5), (27, 7), (42, 9), (39, 10), (50, 13), (83, 20)} Solution:

a. only b1 is significant. (as we have an obvious (0,0) origin, only the slope is relevant for a linear model of the data - this is confirmed by the very small b0.) b. SSR indicates the variation that was explained by the regression.

, i.e., 97% of the variation is explained by the regression. c. d.

Dem Autor des Lsungsvorschlags stellt sich eine Unklarheit betreffend der Prfungsfrage oder deren Lsung: wiki_qm1.png How to compute s? Hilf mit, die Qualitt dieser Seite zu verbessern, indem du eine eindeutige Lsung einfgst oder auf der Diskussionsseite dieses Themas deine Meinung usserst.

e. *beep* --Kermit 15:24, 23. Jan. 2011 (CET)


4 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

14.3
The memory size of the seven programs mentioned in the disk I/O and CPU time data were also measured. The memory size (in kilobytes) and CPU time (in milliseconds) pairs observed are {((70, 2), (75, 5), (144, 7), (190, 9), (210, 10), (235, 13), (400, 20)}. Analyze the data using a simple regression model to predict CPU time as a function of the memory size. Solution:

--Kermit 15:24, 23. Jan. 2011 (CET)

16.1
The performance of a system being designed depends upon the following three factors: 1. CPU type: 68000, 8086, 80286 2. Operating system type: CPM, MS-DOS, UNIX 3. Disk drive type: A, B, C How many experiments are required to analyze the performance if a. There is significant interaction among factors. b. There is no interaction among factors. c. The interactions are small compared to main effects. Solution: a. 3 = 27 b. simple design: c. 9 = 3(Fractional factorial design due to little interaction) --Kermit 15:35, 23. Jan. 2011 (CET) --Flwidmer 14:44, 25. Jan. 2011 (CET)

17.1
Analyze the 2 design shown in Table 17.10 a.Quantify main effects and all interactions. b. Quantify percentages of variation explained. c. Sort the variables in the order of decreasing importance. Solution: a.b.

I 1 1 1 1 1 1

A 1 1 -1

B 1 -1 1

C 1 1

AB 1

AC 1 -1 -1

BC 1

ABC 100 15 40

-1 1

-1 -1

-1

5 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

1 1 1 1 1 385

1 -1 -1 -1 -1 -15

-1 1 1 -1 -1 105

-1 1 -1 1 -1 175 21.875

-1 -1 -1 1 1 -15

-1 -1 1 -1 1 15

1 1 -1 -1 1 215

1 -1 1 1 -1 -65 8.125

30 120 10 20 50 Total Total/8 Variation Variation %

48.125 -1.875 13.125

-1.875 1.875 26.875

11596.9 28.125 1378.125 3828.125 28.125 28.125 5778.125 528.125 100 0.24 11.88 33.0 0.24 0.24 49.82 4.55

c. BC, C, B, ABC, A, AB, AC --Kermit 11:54, 24. Jan. 2011 (CET)

18.1
Table 18.11 lists measured CPU times for two processors on two workloads. Each experiment was repeated three times. Analyze the design.

Workload I J

Processor A

Processor B

(41.16, 39.02, 42.56) (63.17, 59.25, 64.23) (51.50, 52.50, 50.50) (48.08, 48.98, 47.10)

Solution:

W 1 1 1 1 1 1 -1 -1 1 -1 1 -1

P 1

WP

Mean y

Error 6.35707 14.98746 2 1.76827

(41.16, 39.02, 42.56) 40.9133 (63.17, 59.25, 64.23) 62.2167 (51.50, 52.50, 50.50) 51.5 (48.08, 48.98, 47.10) 48.0533 Total Total/4 Variation

-1 -1 1

202.8633 3.7566 -18.0366 -24.93 50.71 745.82 100 0.94 -4.51 -6.23 466.13 62.499

10.58 243.99 1.42 32.71

25.1128

% Variation 3.367

SSE = (40.9133-41.16) + (40.9133-39.02) + (40.9133-42.56) + (62.2167-63.17) + (62.2167-59.25) + (62.2167-64.23) + (51.5-51.5) + (51.5-52.5) + (51.5-50.5) + (48.0533-48.08) + (48.0533-48.98) + (48.0533-47.1)

6 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

= 6.35707 + 14.987 + 2 + 1.76827 = 25.1128

30.3
Which queueing system would provide better performance: an M/M/3/300/100 system or an M/M/3/100/100 system? Solution: Both will provide the same performance. Increasing buffers beyond the population size has no effect. --Kermit 14:53, 24. Jan. 2011 (CET)

30.4
During a 1-hour observation interval, the name server of a distributed system received 10,800 requests. The mean response time of these requests was observed to be one-third of a second. a. What is the mean number of queries in the server? b. What assumptions have you made about the system? c. Would the mean number of queries be different if the service time was not exponentially distributed? Solution: a. E[n] = * E[w] = 10800/3600 * 1/3 = 1 b. Job flow balance. (That all jobs that are sent into the system get a response.) c. Doesn't have an influence. --Kermit 15:47, 24. Jan. 2011 (CET)

31.1
Consider a single-server system with discouraged arrivals in which the arrival rate is only /(n + 1) when there are n jobs in the system. The interarrival times, as well as the service time, are independent and identically distributed with an exponential distribution. Using a birth-death process model for this system, develop expressions for the following: a. State probability pn of n jobs in the system b. State probability 0 of the system being idle c. Mean number of jobs in the system, E[n] d. Effective arrival rate e. Mean response time E[r] Solution: a.

With b. As we know: and with the previous formula for pi we see that this corresponds to a poisson

distribution, and therefore p0 = e c. As already figured out, the probabilities correspond to a poisson distribution with parameter , hence

7 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

d. We know that

thus we can solve:

Using the formula:

we get:

e. Little's Law:

we directly get:

-- Davids 15:52, 25. Jan. 2012 (CET)

31.2
Consider an M/M/ system with an infinite number of servers. In such a system, all arriving jobs begin receiving service immediately. The service rate is n when there are n jobs in the system. Using a birth-death process model for this system, draw a state transition diagram for this system and develop expressions for the following: a. State probability pn of n jobs in the system b. State probability p0 of the system being idle c. Mean number of jobs in the system, E[n] d. Variance of number of jobs in the system, Var[n] e. Mean response time E[r] Solution: a. same as 31.1.a b. same as 31.1.b, e c. same as 31.1.c, E[n] = d. Knowing it is a poisson distribution (compare with 31.1), we know that Var[n] = e. E[r] = E[n]/ = // = 1/ Note the difference to 31.1: Here the effective arrival rate is the same as the normal arrival rate! -- Davids 16:06, 25. Jan. 2012 (CET)

31.3
The average response time on a database system is 3 seconds. During a 1-minute observation interval, the idle time on the system was measured to be 10 seconds. Using an M/M/1 model for the system, determine the following: a. System utilization b. Average service time per query c. Number of queries completed during the observation interval d. Average number of jobs in the system e. Probability of number of jobs in the system being greater than 10 f. 90-percentile response time g. 90-percentile waiting time Solution:

8 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

a. =5/6 b. using E[r] = (1/) / (1-) E[s] = 1 / = E[r]*(1-) = 0.5s c. x = 50/0.5 = 100 d. E[n] = E[nq]+ = E[w]*+=(E[r]-E[s])*(*)+=(3-0.5)*(5/6*2)+5/6 = 5 e. P[n>=10] = p10 = rho^11 = (5/6)^11 = 0.1346 f. q-percentile of E[r] = E[r] * ln(100/(100-q)) => 90-percentile = E[r]*ln(10) = 6.9s g. E[wq] = E[r]-E[s] = 2.5s. q-percentile of E[wq] = (E[wq]/rho) * ln(100rho/(100-q)) = 6.36 --Mbruggmann 18:07, 24. Jan. 2011 (CET)

31.4
A storage system consists of three disk drives sharing a common queue. The average time to service an I/O request is 50 milliseconds. The I/O requests arrive to the storage system at the rate of 30 requests per second. Using an M/M/3 model for this system, determine the following: a. Average disk drive utilization b. Probability of the system being idle, p0 c. Probability of queueing, d. Average number of jobs in the system, E[n] e. Average number of jobs waiting in the queue, E[nq] f. Mean response time E[r] g. Variance of the response time h. 90-percentile of the waiting time Solution: a. (per disk) = 1/0.05, (per disk) = 30/3 = 10 => = / = 0.5 b. pain-in-the-ass formel (aus textbook box 31.2) p0=0.21 c. ( ((m*)^m) / (m!*(1-)) ) * p0 = 0.236 d./e./f./g./h. > richtige formel aus box 31.2 auswerten --Mbruggmann 11:24, 25. Jan. 2011 (CET)

33.1
During a 10-second observation period, 400 packets were serviced by a gateway whose CPU can service 200 pps. What was the utilization of the gateway CPU? Solution: Throughput = X = 400/10 = 40 Servicetime = S = 1/200 U = X*S = 40/200 = 20% --Kermit 15:22, 25. Jan. 2011 (CET)

33.2
The throughput of a timesharing system was observed to be five jobs per second over a 10-minute observation period. If the average number of jobs in the system was four during this period, what was the average response time? Solution: R = Number of Jobs / Throughput = Q/X = 4/5 --Kermit 15:42, 25. Jan. 2011 (CET)

33.3

9 of 10

4/28/2012 9:16 PM

Advanced Systems Lab Exercises From the Book VISki

http://wiki.vis.ethz.ch/Advanced_Systems_Lab_Exercises_From_the...

During a 10-second observation period, 40 requests were serviced by a file server. Each request requires two disk accesses. The average service time at the disk was 30 milliseconds. What was the average disk utilization during this period? Solution: X = 40/10 = 4 Vdisk = 2 Xdisk = X*Vdisk = 8 Sdisk = 0.03 Udisk = Xdisk * Sdisk = 8 * 0.03 = 0.24 = 24% --Kermit 15:42, 25. Jan. 2011 (CET)

33.5
For a timesharing system with two disks (user and system), the probabilities for jobs completing the service at the CPU were found to be 0.80 to disk A, 0.16 to disk B, and 0.04 to the terminals. The user think time was measured to be 5 seconds, the disk service times were 30 and 25 milliseconds, and the average service time per visit to the CPU was 40 milliseconds. Using the queueing network model shown in Figure 32.8, answer the following for this system: a. For each job, what are the visit ratios for CPU, disk A, and disk B? b. For each device, what is the total service demand? c. If disk A utilization is 60%, what is the utilization of the CPU and disk B? d. If the utilization of disk B is 10%, what is the average response time when there are 20 users on the system? Solution: a. V_CPU=1/0.04=25, V_A=0.8/0.04=20, V_B=0.16/0.04=4 (Divide visit probability by exit probability) b. D_CPU=25*40ms=1, D_A=20*30ms=0.6, D_B=4*25ms=0.1 c. U_CPU=1, U_B=0.1 d. N=20, X=U_B/D_B = 1 Job/s, R = N/X - Z = 20/1 - 5 = 15s

Errata
Several solutions in the book contain errors. Here's a complete list of errors as PDF (http://www1.cse.wustl.edu/~jain/books/ftp/errors_all.pdf) Von http://wiki.vis.ethz.ch/mediawiki /index.php?title=Advanced_Systems_Lab_Exercises_From_the_Book&oldid=8904 Kategorie: Advanced Systems Lab Diese Seite wurde zuletzt am 1. Februar 2012 um 21:43 Uhr gendert.

10 of 10

4/28/2012 9:16 PM

Das könnte Ihnen auch gefallen