Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

TELETRAFFIC THEORY

HOMEOWRK 2

Due: March 4tt

1. Shared memory multiprocessor system


Consider a shared memory multiprocessor system. The processors’ ability to share the entire memory
space provides a convenient means of sharing information and provides flexibility in memory allocation.
The price of sharing the memory is the contention for the shared modules. In order to reduce contention,
the memory is split into modules, which can be accessed independently and concurrently with other mod-
ules. When more than one processor attempts to access the same module, only one processor is granted
access, and the other processors wait in a queue. Assume that the time to complete a memory access is
a constant and that all the modules are synchronized. Also assume that processors are fast enough to
generate a new request as soon as their current request is satisfied, and that a processor can not generate
a new request when it is waiting for the current one to be completed. This system can be modelled as a
Markov process, where the state of the system is an m-tuple ( M1 ,M2 ...), with Mi representing the number
of jobs at the memory module i. Let qi represent the probability that a processor accesses module i.

(a) Consider the specific case of a system with two processors and two memory modules. Represent this
system as a DTMC, and find (if possible) the long term probabilities.
(b) Compute the average number of requirements completed per cycle.
(c) Consider now that the probabilities of both processors are different: processor 1 has associated
probabilities r1 and r2 , and processor 2 has associated probabilities q1 and q2 . Sketch the new
DTMC and compute the average number of requirements completed per cycle.
(d) Consider now the case where the processors require nonzero amount of time to generate the request.
Assume that the processor request time is identical to the memory cycle time. Sketch the new DTMC
and compute the average number of requirements completed per cycle.

2. Consider a program that uses two stacks, sharing an area of memory containing m locations. The stacks
grow towards each other from the two opposite ends. An overflow will occur upon an insertion into either
stack when i+j=m (i is the length of the left stack, and j the length of the right one).

1
At each instant of time, an operation on one of the stacks takes place with the probabilities shown in the
following figure. (An access operation does neither delete nor insert a packet in the stack)

(a) Draw the Discrete Time Markov chain describing the system.
(b) Explain how to compute the probability of overflow.

3. Considere un switch de comunicaciones con una capacidad K en el buffer, y que envı́a paquetes de longitud
constante, según un protocolo de comunicaciones definido. De acuerdo con este protocolo, el tiempo se
divide en intervalos (slots) fijos. Si al inicio de un intervalo, hay un paquete en el buffer, el switch lo
envı́a inmediatamente (se envı́a máximo un paquete por slot de tiempo). Si al inicio del intervalo no hay
paquetes, el switch no hace ningún envı́o, aún cuando lleguen paquetes en el intervalo. Sea Xn el número
de paquetes en el buffer al final del slot n, y An el número de paquetes que llegan durante el slot n.
(a) Si es posible, modele este sistema como una cadena de Markov de tiempo discreto.
(b) Si K =7 y An es una variable aleatoria de Poisson con λ=1, defina la matriz de transición de una
etapa del proceso.
(c) Sea Ti la variable aleatoria que representa el tiempo que el sistema permanece en el estado i durante
una visita a dicho estado. Se puede demostrar que Ti sigue una distribución geométrica, i.e. Ti
(n−1)
=(1-pii )*pii . Calcule el tiempo que el buffer está lleno.
(d) Encuentre el número promedio de paquetes en el buffer.
4. Una compañı́a tiene una escala salarial de 4 niveles (1, 2, 3, 4) para cierto tipo de empleo. Durante el
año, los empleados pueden encontrar otro trabajo en la compañı́a con otra escala salarial o pueden dejar
la compañı́a. Al final de cada año, la compañı́a determina el nivel salarial de cada empleado para el
año siguiente. Por simplicidad, se asume que el cambio a otro puesto o la salida de la compañı́a ocurren
también a finales del año. La observación del comportamiento de los empleados ha llevado al siguiente
modelo: del grupo de empleados en el trabajo con la escala salarial de 4 niveles un porcentaje p sale de
la compañı́a, un porcentaje q se cambia a otro trabajo dentro de la empresa, r se queda en el mismo nivel
salarial para el año siguiente, y s es ascendido al siguiente nivel salarial en la escala. Los valores p, q, r y
s se muestran en la siguiente tabla:
Nivel 1 Nivel 2 Nivel 3 Nivel 4
p 20 20 20 10
q 0 0 10 40
r 0 30 40 50
s 80 50 30 0
Si un empleado empieza en el Nivel 1, responda las siguientes preguntas.

(a) Defina la cadena de Markov de tiempo discreto que describe el comportamiento del salario de un
empleado en este trabajo. El modelo debe incluir la posibilidad de dejar el trabajo.

2
(b) Encuentre la probabilidad de que un empleado tenga otro trabajo dentro de la compañı́a al empezar
el quinto año.

5. Un red de comunicación tiene dos nodos y dos canales de transmisión. Cada transmisión dura un ciclo
de reloj, y los nodos siempre tienen paquetes para transmitir. Los estados (i; j) representan el núumero
de nodos que esperan acceder el canal 1 y 2, respectivamente. Sea qk , la probabilidad de que un nodo
requiera el canal k (q1 + q2 = 1 ).
(a) Dibuje la cadena de Markov de Tiempo Discreto que representa el sistema.
(b) Encuentre las probabilidades de estado estable
(c) Encuentre el promedio de canales ocupados.
6. On a given day Mark is cheerful, so-so, or glum. Given that he is cheerful on a given day, then he will
be cheerful again the next day with probability 0.6, so-so with probability 0.2, and glum with probability
0.2. Given that he is so-so on a given day, then he will be cheerful the next day with probability 0.3, so-so
again with probability 0.5, and glum with probability 0.2. Given that he is glum on a given day, then he
will be so-so the next day with probability 0.5, and glum again with probability 0.5. Let state 1 denote
the cheerful state, state 2 denote the so-so state, and state 3 denote the glum state. Let Xn denote Mark’s
mood on the nth day, then fXn; n 5 0; 1; 2; ...g is a three state Markov chain.
(a) Draw the DTMC that represents the process and specify the one-step transition probability matrix.
(b) Given that Mark was so-so on Monday, what is the probability that he will be cheerful on Wednesday
and Friday and glum on Sunday?
(c) On the long run, what proportion of time is Mark in each of his three moods?
(d) Let the random variable Di denote the time the Markov chain remains in state i during a visit to
that state. Consider that Di can be modelled as a geometric random variable. Based on this fact,
compute the average time that Mark is cheerful.

You might also like