1) given T= ( P, E, D)
T1= (100, 30,100)
T2= (150, 20 , 150)
T3= (200,25 , 200)
Processor Utilization due to all three tasks
= E1/P1 + E2/P2 + E3/P3
= 30/100+ 20/150+ 25/200
= 0.56
2) eb = 700 ms processing time for background task
T1= (p1= 50 ms, e1=20 ms, d1=50ms)
T2= ( p2= 100ms, e2=20ms, d2= 100ms)
Ct(completion time) = eb/(1-summation(ei/pi))
Ct= (700*10^-3) / 1- (20/100+ 20/50)
Ct= 175ms (e)
3) summation ei/pi
= (10/100+20/150+5/50)
= 0.3333333
~ 0.34
4)
e) scheduler would get invoked too many times thereby increasing the scheduling overhead
g) unless a job runs to completion its partial results might be used by other jobs leading to inconsistency
5)Major cycle = lcm (100, 150 , 50)
=300
According to constraints for selecting a frame
We need to select a frame whose size is larger than the largest task execution time
Hence we need to select a frame in this case which is larger than 27
Hence possible frame sizes are (30,50,60 , 75,100,150,300)
Second constrain :
2f - gcd( pi, f) <=di
Let f=30
60 - gcd(100, 30)
60-10=50 which is less than (100)
Hence accepted
60- gcd (150, 30) =30 which is less than 150
Hence accepted
60- gcd(50,30) =50 hence accepted
Now let f=50
100- gcd(100, 50)
100-50=50 which is less than(100)
hence accepted
100- gcd (150, 50) = 50 which is less den 150
100- gcd (50, 50) = 50 hence accepted
Again consider f = 60
120- gcd(100, 60) = 100
Hence accepted
120- gcd(150, 60) = 90 which is less den 150 hence accepted
120- gcd(50, 60) = 110 which is more than 50 hence not accepted
Therefore only 30 n 50 can be considered as feasible frames (c)
6) major cycle = lcm (30, 60) = 60
Possible frame sizes ( 30, 60)
Let f=30
60-gcd( 30, 30) = 30 hence accepted
60- gcd(60, 30) =30 which is less than 60 hence accepted .
Let f= 60
120- gcd(30, 60) = 90 which is greater than 30 hence not accepted
120- gcd of (60, 60) = 60 hence accepted
Therefore the feasible frame size is 30 (d)
7 ) given T= (E, P, D)
T1= ( 10, 100, 100)
T2 =( 20 , 150, 150)
T3 = ( 5, 50 , 50)
eb= 1000( it should be in milliseconds)
Ct = 1000 ms / 1- ( 10/ 100 + 20/150 + 5/50)
= 1500 milliseconds
8) a) dynamic priority algorithm
c) Optimal uniprocessor task Scheduling algorithm
9) T1 =(4,2,4)
T2 = (6, 3,6)
Format T=( P, E, D)
Major cycle= lcm(4, 6) = 12
Possible frame is feasible frames 4, 6,12
Let f= 4
8- gcd(4, 4) = 4 hence accepted
8 - gcd(6, 4) =6 hence accepted
Let f= 6
12- gcd( 6,6) = 6 hence accepted
12- gcd(4, 6) = 10 which is greater than 4 hence not accepted.
Therefore the frame size is 4
Let f = 12
24 - gcd (6, 12) =12 which is greater than 6 hence not excepted
10)a) EDF is more proficient than RMS
e) EDF and RMS are bothe event driven schedulers
11) a) arrival of task instances
b) completion of task instances
12) b) (lcm(p1, p2, p3) /f) *f= lcm (p1, p2, p3)

0 Comments