• Non ci sono risultati.

Test of Discrete Event Systems - 09.11.2017 Exercise 1

N/A
N/A
Protected

Academic year: 2021

Condividi "Test of Discrete Event Systems - 09.11.2017 Exercise 1"

Copied!
1
0
0

Testo completo

(1)

Test of Discrete Event Systems - 09.11.2017

Exercise 1

A dual-core processor is composed of two central processing units (CPUs) and a dedicated cache. Programs executed by the processor can be of two types. Type 1 programs are those that require sequential computing, and therefore are executed in one CPU only. Type 2 programs allow for parallel computing and therefore can be executed simultaneously in both CPUs.

Consider a dual-core processor preceded by a cache which may host only one program waiting to be executed. Programs arrive as generated by a Poisson process with rate λ = 0.05 arrivals· s

1

. Programs are of type 1 with probability p = 2/3. The number of operations required by a generic program is a random variable L whose cumulative distribution function can be approximated by an exponential distribution with expected value 10

6

operations. The speed of each CPU is v = 10

5

operations· s

1

. If a program arrives when the cache is full, it is rejected. A type 2 program is executed only when both CPUs are available. For a type 2 program requiring L operations, L/2 operations are executed in one CPU and L/2 operations in the other (parallel computing).

1. Model the system through a stochastic timed automaton (E, X , Γ, p, x

0

, F ), assuming that both CPUs are initially idle.

2. Assume that both CPUs are executing type 1 programs and the cache hosts a type 1 program. Compute the probability that both CPUs are idle when the next program arrives.

3. Assume that both CPUs are executing type 1 programs and the cache hosts a type 2 program. Compute the mean time to the start of the execution of the type 2 program.

4. Assume that both CPUs are executing type 1 programs and the cache hosts a type 2 program. Show the procedure to compute the probability that the two type 1 programs and the type 2 program are all executed within T = 15 s.

Exercise 2

A warehouse contains up to 150 refrigerators. Two trucks take the refrigerators from the warehouse to the points of sale. Truck 1 may load 50 refrigerators, while truck 2 may load 100 refrigerators. Truck 1 returns to the warehouse according to a Poisson process with average interevent time equal to 36 hours. Truck 2 returns according to a Poisson process with average interevent time equal to 60 hours. The trucks always return empty, and load as much refrigerators as possible from the warehouse. The full capacity of the warehouse is restored according to a Poisson process with average interevent time equal to 48 hours. The warehouse is initially full.

1. Model the dynamics of the number of refrigerators in the warehouse through a stochastic timed automaton (E, X , Γ, f, x

0

, F ).

2. Assume that the warehouse contains 100 regrigerators. Compute the probability that the warehouse is empty when the full capacity is restored.

3. Compute the average time that the warehouse remains full.

4. Compute the probability that exactly two trucks arrive in one day.

Riferimenti

Documenti correlati

The effective width of the beam web in tension should be taken as equal to the effective length of the equivalent T-stub representing the end plate in bending, obtained for

„ Later, with the emergence of formal aspects, our object will become “rigorous” (making reference, of course, to the conception of rigor in an historical and cultural context –

Throughout the book Diamond argues that the East-West axis of Eurasia provided an advantage in the dispersal of useful, mainly domesticated, plants and animals.. 87 identifies this

Their main source of stiffness and lateral strength is given by the flexural resistance of members and connections, and the seismic energy dissipation capacity and ductility

The alarm system of a building is equipped with a keypad located inside the entrance door. Assume that the alarm is active, and let time t = 0 be the instant when the entrance door

Raw parts arrive at phase 1 according to a Poisson process with average interarrival time equal to 105 minutes.. To a first approximation, it is assumed that both phases have buffers

Truck 1 returns to the warehouse according to a Poisson process with average interevent time equal to 36 hours.. Truck 2 returns according to a Poisson process with average

Truck 1 returns to the warehouse according to a Poisson process with average interevent time equal to 36 hours.. Truck 2 returns according to a Poisson process with average