# Advanced Systems Lab Exercise Sheet 1

Wechseln zu: Navigation, Suche

# Queuing Exercises Sheet 1

## Exercise 1

${\displaystyle \lambda =125}$

a) ${\displaystyle E[s]=2ms=0.002}$

b) ${\displaystyle \rho =\lambda \cdot E[s]=125\cdot 0.002=0.25=25\%}$

For a G/G/1 system. (Traffic Intensity: A measure of the utilization of a station. [1])

c) ${\displaystyle E[n]=\lambda \cdot E[w]=125\cdot 0.002=0.25}$ jobs

d) ${\displaystyle E[w_{q}]=0}$

e) ${\displaystyle E[w]=E[w_{q}]+E[s]=0+0.002=0.002}$

For an M/M/1 system

c) ${\displaystyle E[n]={\frac {\rho }{1-\rho }}={\frac {0.25}{1-0.25}}=0.{\bar {3}}}$ jobs

d) ${\displaystyle E[w_{q}]=E[w]-E[s]=0.002{\bar {6}}-0.002=0.000{\bar {6}}}$

e) ${\displaystyle E[w]={\frac {1/\mu }{1-\rho }}={\frac {E[s]}{1-\rho }}={\frac {0.002}{1-0.25}}=0.002{\bar {6}}}$

## Exercise 2

Given: response time (r):0.050 [s]

We are looking for the throughput ${\displaystyle X}$:

${\displaystyle X={\frac {\text{number of completions}}{\text{time}}}={\frac {1}{0.05}}=20[{\frac {\text{operations}}{\text{second}}}]}$ (see book p. 556)

## Exercise 3

Given:

• Queue length (n) = 10
• Maximum response time (${\displaystyle {r_{max}}}$) = 2 [seconds]

We search:

• Maximum request rate (${\displaystyle {\lambda _{max}}}$)

The maximum service time possible is ${\displaystyle {\frac {r_{max}}{n}}=2/10=0.2}$.

Therefore ${\displaystyle {\lambda _{max}}}$ is: ${\displaystyle {\lambda _{max}}=1/E[{r_{max}}/n]=5}$ [request per second].

 Dem Autor des Lösungsvorschlags stellt sich eine Unklarheit betreffend der Prüfungsfrage oder deren Lösung: I would say that this question is not solvable: E.g. having a system with Service time 4 s (valid instance of this exercise) means that only an arrival rate of 0 can be supported. Other exemples will show the non-solvability as well. Currently I'm still missing a reply from Alonso on that. -- Davids 17:11, 28. Jan. 2012 (CET) Hilf mit, die Qualität dieser Seite zu verbessern, indem du eine eindeutige Lösung einfügst oder auf der Diskussionsseite dieses Themas deine Meinung äusserst.

## Exercise 4

${\displaystyle \rho ={\frac {\lambda }{m\mu }}=\lambda {\frac {E[s]}{m}}\Rightarrow \rho =\lambda \cdot E[s]}$

The implication holds for ${\displaystyle m=1}$

${\displaystyle \Leftrightarrow }$

${\displaystyle E[n]=\lambda \cdot E[w]\Rightarrow \lambda \cdot E[s]}$

From this 2 implications we can retrieve

${\displaystyle \rho =E[n]}$

## Exercise 5

Both solutions are equivalent, only the notation differs.

Solution 1

${\displaystyle E[n_{q}]=100}$

${\displaystyle \lambda =5000}$

${\displaystyle E[s]={\frac {1}{5000}}=0.0002}$

${\displaystyle E[w_{q}]=E[n_{q}]\cdot E[s]=100\cdot 0.0002=0.02}$

${\displaystyle E[w]=E[w_{q}]+E[s]=0.02+0.0002=0.0202s}$

Solution 2

Given:

• expected value of the queue size (${\displaystyle E[n_{q}]}$) = 100
• interarrival time(${\displaystyle E[\tau ]}$) = 1/5 milliseconds = 0.2 milliseconds = 0.0002 seconds

We search the time until a given job is "trough the system"

Mean arrival rate ${\displaystyle E[\lambda ]=1/E[\tau ]}$ = 1/0.0002 = 5000 mails per second

As the queue has always the same size, the interarrival time has to be equal to the service time. And the Mean arrival rate has to be the same as the mean service rate therefore ${\displaystyle \lambda =\mu }$ = 5000 mails per second.

The expected value of the interarrival time (and therefore also the service time) has to be ${\displaystyle E[s]=1/E[\mu ]}$ = 0.0002 seconds.

This give us ${\displaystyle r=(E[n_{q}]+m)*E[s]=101*0.0002}$ = 0.0202 [seconds].

Alternative Solution:

This solution is based on the official given solution during the course of 2009. Here the PDF-2009

Given: ${\displaystyle E[n]=100}$ and ${\displaystyle \lambda =5J/ms}$

Using Little's Law we find: ${\displaystyle E[r]=E[n]/\lambda =100/5=20ms}$

--Giulio 14:31, 31. Jan. 2012 (CET)

## Exercise 6

${\displaystyle \lambda =5000}$

${\displaystyle \rho =\lambda \cdot E[s]=0.4}$

 Dem Autor des Lösungsvorschlags stellt sich eine Unklarheit betreffend der Prüfungsfrage oder deren Lösung: I dont see how you get to 0.4. for me it's ${\displaystyle \rho =\lambda \cdot E[s]=0.0002\cdot 5000=1}$ Hilf mit, die Qualität dieser Seite zu verbessern, indem du eine eindeutige Lösung einfügst oder auf der Diskussionsseite dieses Themas deine Meinung äusserst.

${\displaystyle E[s]={\frac {\rho }{\lambda }}={\frac {0.4}{5000}}=0.08ms}$

${\displaystyle E[w]=E[w_{q}]+E[s]=100*0.08+0.08=8.08ms}$

Other Solution:

Given: ${\displaystyle \rho =0.4,\lambda =5000J/s}$

${\displaystyle \mu ={\frac {\lambda }{\rho }}=12'500J/s\Rightarrow E[s]=0.0008s}$

Assuming M/M/1: ${\displaystyle E[w]={\frac {\frac {1}{\mu }}{1-\rho }}={\frac {0.00008s}{0.6}}=0.00013s}$

${\displaystyle E[w_{q}]=E[w]-E[s]=0.000053s}$

Where we did not use ${\displaystyle E[n_{q}]=100}$. I guess it does not make sense to say that this still holds, even if the traffic intensity is 0.4. I would rather use the formulas for M/M/1, which indicate that ${\displaystyle E[n]=\rho /(1-\rho )=0.666}$, and since ${\displaystyle E[n]>E[n_{q}]}$ holds, ${\displaystyle E[n_{q}]=100}$ can't be.

Alternative Solution: Given: ${\displaystyle \rho =0.4}$ and ${\displaystyle \lambda =5J/ms}$ (from the previous exercise)

${\displaystyle \mu ={\frac {\lambda }{\rho }}={\frac {5}{0.4}}=12.5J/ms}$

${\displaystyle E[s]={\frac {1}{\mu }}={\frac {1}{12.5}}=0.08ms}$

From the previous exercise (the alternative solution) we know that ${\displaystyle E[r]=20ms}$, therefore

${\displaystyle E[w]=E[r]-E[s]=20-0.08=19.92ms}$

--Giulio 14:33, 31. Jan. 2012 (CET)