1,390 views

3 Answers

Best answer
3 3 votes

Why complicate this one . first of all one tip. never panic seeing a question. whenever u see such a question the answer is very easy just rewind the concept . 

so here it is asking cpu efficincy . simply cpu efficency = usefull work done by cpu/ total time .

now there are n processes which will be running and after every process context switch willl occur.

total time=n*time qunatun(q)+ n*context switch time (s)=nq+ns .
what is the usefull work done by cpu . we know context switching the wastage time . the usefull time will be only nq. because in that time cpu was doing usefull work . 

A-

cpu efficiency =nq/nq+ns=q/q+s

b- now it is giving s=q. just replace s with q then it is q/q+q=q/2q=1/2
 

• selected by
1 1 vote
cpu efficiency = useful time of cpu / total cpu time

given r is avg running time .

q is quantum time

now we have to calculate how many time processes are switched ,so no of switched = r/q

so total time in switching is s.*r/q

total cpu time is = avg running time + swiching overhead = r +r/q*s

and usefull time is only r .

so efficiency is r/(r(q+s)/q)= q/(q+s)

2) q=s so cpu efficiency = 1/2
0 0 votes
for question1 . total no.of context switching =r/q; so time spend in context switching = s*r/q; total time in process completion=r+s*r/q; efficiency= useful time/total time; then efficiency=r/(r+s*r/q) =r*q/r*(q+s) q/(q+s). answer (A) is right. **FOR QUESTION 2** put q=s in above answer then we get efficiency=q/(q+q); =1/2 answer (c) is right.
Position:
Show:

Related questions

0 0 votes
2 answers 2 answers
12.0k
12.0k views
AnilGoudar asked May 12, 2017
12,016 views
What happens to average Turn Around Time if time quantum increased?
1 1 vote
1 1 answer
13.0k
13.0k views
suchismith roy asked Mar 26, 2017
12,990 views
How do we measure the throughput of a scheduling algorithm? In every algorithm,the total time will be the sum of the burst times..and the same number of tasks will get ex...
3 3 votes
2 2 answers
2.5k
2.5k views
shikharV asked Nov 27, 2015
2,518 views
Between Round robin and shortest job first CPU scheduling algorithm which one has better average turnaround time?