in Operating System edited by
321 views
0 votes
0 votes

Consider four process all are arriving at time zero, with total execution time of 20, 10, 10 and 20 unit respectively. Each process spends the first 20% of execution time doing CPU, the next 60%of doing I/O computation and the last 20% of time doing CPU computation again. The operating  system uses longest time  remaining first scheduling algorithm (LRTF) and schedules a new process either when running process get blocked I/O or when the running process finishes its CPU burst. Assume that are I/O operations can be overlapped as much as possible. What is the completion time of process P0. [Note: When same burst occurs for multiple process high priority given to lowest process id].

schedules a new process either when running process get blocked I/O or when the running process finishes its CPU burst

doesn't this line makes it LTF (non preemptive) ??

because they solve this by LRTF(preemptive ).

 

 

in Operating System edited by
321 views

4 Comments

if scheduler block the process, then it is preemptive

if process itself block ( actually it happens when process requires I/O ), then it is Non-preemptive
0
0
Please can anyone provide correct gantt chart

I am getting

In case of Non preemptive LRTF : Completion time of p0 = 20

In case of Preemptive LRTF : Completion time of p0 = 26
0
0

schedules a new process either when running process get blocked I/O or when the running process finishes its CPU burst

Above line clearly suggests that it is a non-preemptive schedule.

So solving by non-preemption gives 20 as answer.

0
0

Please log in or register to answer this question.

Related questions