scheduling - Round robin worst case response time -
the pseudo-codes below shows typical round robin software architecture. if every device requires 20ms service , updatelcd() requires 10ms execute, worst case response time?
void main (void) { while(1) { if (!! device needs service) { !! handle device } if (!! device b needs service) { !! handle device b } . . . . if (!! device d needs service) { !! handle device d } updatelcd(); } }
since there total of 4 devices (a,b,c,d) , if after servicing device a, device needs servicing, worst case response time here should 20+20+20+10 = 70ms (assuming devices b, c , d needs servicing).
however, in answer selection, there only: 85ms, 110ms, 35ms , 25ms. think need on understanding of round robin architecture.. thanks!
first, math wrong: if there 4 devices (a, b, c, , d), worst case time 20*4 + 10 = 90ms.
by process of elimination, though, can't 85, 35, or 25 (since provided times multiples of 10), "correct" answer must 110… assume 5 devices, not four.
Comments
Post a Comment