P. 1
Operating Systems Concepts Manual 2010

Operating Systems Concepts Manual 2010

|Views: 7,230|Likes:

More info:

Published by: Takashi Carlton Hamilton on Sep 12, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/03/2013

pdf

text

original

A pre-emptive algorithm stops a job in middle of the job running if a job that satisfies a criteria

comes along.

Examples of pre-emptive algorithms are:

Operating System Concepts

Updated Jan 2010

Mrs. G. Campbell

Copyright @ 2010

51

• Shortest remaining time first (SRTF) – stops the shortest job if an even shorter job

enters the system. In other words, if a new job arrives with CPU burst length that is

less than the remaining time of the current job then the current job will be pre-empted

for the other.

Example:

Process Arrival Time Burst Time

P1

0

7

P2

2

4

P3

4

1

P4

5

4

The Gantt chart would be as follows:

P1

P2

P3

P2

P4

P1

0

2

4

5

7

11

16

Average waiting time = (9+1+0+2)/4 = 3

• Pre-emptive priority – stops the highest priority job if a job with a higher priority

enters the system.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->