in DS
883 views
1 vote
1 vote



here SJF is given as well as priorities are given, given answer followes only priority scheduling
but i think priority is used in case where there is a tie between two processes in SJF
what is the correct approach?

in DS
883 views

17 Comments

I think

SJF for Priority scheduling $\Rightarrow$ SJF is used for priority scheduling $\Rightarrow$ priority scheduling first then SJF if conflict occurs.
0
0
any reference ? or  reason ?
0
0
yes, I agree with you@Anusha. I too got confused while taking the test. I think the question is not framed properly.
1
1
SJF is a special case of Priority scheduling, the priorities will be changed according to the burst time may be the priorities will be over written as they did not say priorities will change we cannot say anything i think
0
0
as far as i know!! priority will come into play ,when there is a tie between sjf
2
2
SJF is non - premtive scheduling . What is the necessity of priority then ?
0
0
@uddipto @vijay@pavan
i think they need to explain why priorities are used. isnt it? i am now thinking that its implmentation dependent.hence shud be clearly mentioned in the question about the use of priorities
i didnt find any reference on this
do u have any reference supporting ur argument ?
0
0
SJF for priority scheduling is SRTF. rt?
0
0
when in SJF, burst times worked as priority then its SRTF. but here they gave priorities separately.
0
0
this seems not a standard question!
0
0
yea @Anusha

here priority scheduling will take into pic.

As preemptive scheduling always preferred over non preemptive

------------------------------------------------------------------------------------------------------------

Also in this type of question , step by step analysis will give better result- other than thinking for a perticular scheduling
0
0
means according to u first we will pick process A at time 10 excute till 20. as at 20 Bcomes and its priority is higher than A, we shud preempt A and run B? is this what u meant @srestha?
0
0
I agree with @vijayc here, this doesn't seem to be a standard scheduling just poorly framed question. In GATE, they will properly mention tie-breaker.
0
0
@kantikumar yea i agree with u.
0
0

yes

0-----------10-----------A------------20-----------------B------------70---------C-----------------80-------------D----------120---------A-------140------E-------160

Here when Pi >Pj  then Priority scheduling comes in pic

0
0
I think its priority scheduling , But if priorities are same, then follow SJF
0
0
many different opinions :D
0
0

Please log in or register to answer this question.