The Gateway to Computer Science Excellence
0 votes

in Operating System by Loyal (7.5k points)
edited by | 206 views

@Shaik Masthan @MiNiPanda

For executing the processes do we have to consider the entire burst time or the burst time before I/O request

The time spent in doing I/O should not be of considered as a part of waiting time.

Only the time spent in waiting in the ready queue accounts for the WT.

So waiting time=Completion time -( CPU burst+IO burst+Arrival time)

Wt(P1)=7, Wt(P2)=0, Wt(P3)=4, WT(P4)=4

Avg =11/4=2.75

Ans given is 5.5 but that is done in the incorrect way.

I will comment the link of reference. Let me search it.

I checked this just 2days back :P

My confusion is with the last sentence "consider only the CPU times as burst one"

What does it mean? :/

See the selected ans.

The 2nd answer followed the same approach as made easy which wasn't approved by Arjun Sir as you can see from his comments




and what about efficiency ,they have given 100%,is that correct?



Can you please share your opinion on the question


@Shaik Masthan The link you attached has the same question right..? I have seen this question before and then searched it on the net..then got that link (which I attached). There the approach followed was different.

the link which you attached, " selecting a process for running, having criteria on Priority. "

So there is no problem, But in this question criteria is " Shortest Burst time ", so confusion arises !

But ultimately we have to calculate the waiting time na?

According to the solution of ME, the time spent on doing I/O is also considered as part of the waiting time while in the definition says that WT is the time spent by a process in the ready queue (and not in the IO) waiting for its turn to come.

Forget about waiting time !

actually my doubt is :-

after some time of scheduling, Now

let P1 is required 1 BT, before going to I/O, and 5 BT after completion of I/O and it is available in Ready Queue.

let P2 is required 2 BT after completing I/O and available in Ready Queue.

Now is Short term Scheduler based on SRTF, which one will allow to run, is P1 or P2 ?

is considering, P1 requires 1 BT or P1 requires (1+5) BT ? where P2 requires 2 BT.

@Shaik Masthan

If both arrives in the ready queue at the same time, then the one with shorter CPU burst will be given preference in case of SRTF..and if the bursts are same then the one having older process id will be given the priority.

you didn't get me correctly !

just leave it !

So according to the example provided by Shaik, P1 should be scheduled right?

Okay as you wish :)

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,322 answers
105,158 users