A program consists of two modules executed sequentially. Let f1(t) and f2(t)…
2003
A program consists of two modules executed sequentially. Let f1(t) and f2(t) respectively denote the probability density functions of the time taken to execute the two modules. The probability density function of the overall time taken to execute the program is given by:
- A.
f1(t) + f2(t)
- B.
integral from 0 to t of f1(x) f2(x) dx
- C.
integral from 0 to t of f1(x) f2(t - x) dx
- D.
max{f1(t), f2(t)}
Attempted by 1 students.
Show answer & explanation
Correct answer: C
Let T1 and T2 be the execution times of the two modules, with densities f1(t) and f2(t). Since the modules execute sequentially, the total execution time is T = T1 + T2. For the total time to be t, the first module may take x time and the second must take t - x time. Summing over all possible x gives the convolution density: f_T(t) = integral from 0 to t of f1(x) f2(t - x) dx. Therefore, option C is correct.