1 given the following actual cpu burst for a


1. Given the following actual CPU burst for a task,  {6, 4, 6, 4, 13, 13, 13}, and an initial "best guess" at the burst as 10, develop a simulation to predict the length of the task's next CPU burst using the following formula.  Execute the simulation using an α of 0.1, 0.5, and 0.9.  Include in the simulation the calculation of average burst time for each α and its comparison with the "true" average.

 τn+1 =  αnt + (1 - α)nτ

2. The Poisson function,

P(r) = Cr*e-C/ r!  where C = the distribution average, is useful for modeling a distribution when the probability of any one occurrence of P(r) is extremely small and r is the number of occurrences of the event. Applying this average to message volumes and interarrival rates, C =  λ * T where λ  = message volume and T = interarrival rate, would imply:

r (- λT) P(r) =  (λT) * e / r!

Develop a simulation program to accomplish the following:

1) Ask for and accept message volume per hour, Lambda.

2) Convert this volume to message volume per second, Lambda/3600.

3) Ask for and accept the number of simulations desired.

4) Ask for and accept a random number generator seed.

5) Perform the simulation loop to determine and print interarrival times for Lambda where RN is determined by a random number generator function. 

6. Compute the average message interarrival time = sum of all interarrival times / count.

Solution Preview :

Prepared by a verified Expert
Applications of MATLAB: 1 given the following actual cpu burst for a
Reference No:- TGS0442239

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)