Variance of Processing Time for Different Policies - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Variance of Processing Time for Different Policies

Description:

Variance of Processing Time for ... Exercise: recalculate variance of processing time ... Variance of Processing Time for tBk=k (Exercise) Solution of Case ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 13
Provided by: devin4
Category:

less

Transcript and Presenter's Notes

Title: Variance of Processing Time for Different Policies


1
Variance of Processing Time for Different Policies
  • Assume that there are n processes on the system
    and process 1 lt k lt n has processing time equal
    to TBk2k.
  • Compute average response (turnaround) Tt time for
    these processes assuming
  • 1. arrival in ascending order of process numbers
    and FCFS schedule,
  • 2. arrival in descending order of process numbers
    and FCFS schedule,
  • 3. arrival in ascending order of process numbers
    and RR schedule with time slice equal to 1,

2
Variance of Processing Time for Different Policies
  • 4. arrival in descending order of process numbers
    and RR schedule with time slice equal to 1.
  • Compare the difference between Tts of the same
    scheduling policy for different orders of
    processes.
  • Exercise recalculate variance of processing time
    for TBk k.

3
Solution
  • Let tw(k) denote the waiting time of process k,
    Tw average waiting time. Then

and
Tw
where Tt denotes the average turnaround time
4
Solution of Case 1
5
Solution of Case 2
6
Solution of Case 3
  • Let tp(k) denote the processing time for process
    k, where 2 lt k lt n

tp(k) tp(k-1) 1 (n - k 1)2k-1
Reason this process in one time unit completes
the round which was last for process k-1, and
then makes 2k-1 additional rounds in RR schedule
compared to process k-1. Each of this additional
rounds has n-k1 processes in it. We also have
tp(1) n 1 because the first round for process
1 takes n units and the last round just one unit.
7
Solution of Case 3 continued
so,
and finally,
8
Solution of Case 4
  • In this case tp(1)2n and for k gt 1

Reason all 2k-1 rounds which process k executes
after process k-1 finished have all n-k1
remaining processes executed before process k
finishes. Hence,
9
Solution of Case 4 continued
10
Variance of Processing Time for tBkk (Exercise)
11
Solution of Case 3 for the Exercise
Let tp(k) denote the processing time of k-th
process, then for kgt1 tp(k) tp(k-1)
n-k2 because process k makes one round in RR
schedule with n-(k-1) processes left and then one
round for the last work unit and clearly tp(1)
1, so
12
Solution of Case 4 for the Exercise
In this case tp(1)n and for kgt1 tp(k)
tp(k-1)n-k1 because the round for process k
has n-k1 processes executed before and with it,
so
Write a Comment
User Comments (0)
About PowerShow.com