HW2 Solution

# HW2 Solution - 1. Use exponential averaging to predict the...

This preview shows pages 1–2. Sign up to view the full content.

1. Use exponential averaging to predict the size of the next CPU burst. Use α =0.75. (a) (10 points) At time 5, the predicted CPU burst was 8 but the actual CPU burst was 4. What is the prediction for time 6? T n+1 = α t n + (1- α )T n T 6 =(0.75)4 + (1-0.75)8 = 3+2 = 5 (b) (10 points) At time 6, the actual CPU burst was 12. What is the prediction for time 7? T 7 =(0.75)12 + (1-0.75)5 = 9+1.25=10.25 2. (a) (10 points) What is the average waiting time and the average turnaround time of the following Gantt chart where processes P 1 and P 2 arrive at time 0, processes P 3 and P 4 arrive at time 6, and process P 5 arrives at time 8. Average waiting time: (0+5+9+6+0)/5 = 4 Average turnaround time: (5+8+15+9+4)/5 = 8.2 (b) (10 points) What is the average waiting time and the average turnaround time of the following Gantt chart where the processes P 1 and P 2 arrive at time 0, process P 3 arrives at time 3, process P 4 arrives at time 12, and process P 5 arrives at time 16. Average waiting time:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/18/2008 for the course CS 4323 taught by Professor Dr.li during the Fall '07 term at Oklahoma State.

### Page1 / 2

HW2 Solution - 1. Use exponential averaging to predict the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online