13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Policies 353C10181220BE03915AD0 5 10 15 20A B C D EFigure 2.7 FCFS scheduleThe following table shows the same information.Process Arrival Service Start FinishT M Pname time required time time A 0 3 0 3 3 0 1.0 B 1 5 3 8 7 2 1.4 C 3 2 8 10 7 5 3.5 D 9 5 10 15 6 1 1.2 E 12 5 15 20 8 3 1.6Mean 6.2 2.2 1.74FCFS is an example of a non-preemptive policy, which means that we neverblock a process once it has started to run until it leaves the domain of the short-termscheduler. (We might terminate a process that has exceeded an initial time estimate, butsuch termination is different from preemption.) The decision of when to run a particularprocess is based solely on the relative order in which it arrives at the ready list.Non-preemptive policies are an example of the Hysteresis Principle, which wewill encounter repeatedly.Hysteresis PrincipleResist change.All change has a cost. In our case, preemption involves switching to a new process,which requires updating software tables and often hardware tables as well. Nonpreemptivescheduling policies avoid the cost of change by resisting process switchinguntil it is inevitable.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!