Question: Consider a simple operating system where live processes are either running, ready to run, or blocked on an event, before they exit. a) State four

Consider a simple operating system where live processes are either running, ready to run, or blocked on an event, before they exit.

a) State four conditions under which the operating system will try to schedule processes.

b) OS schedulers are said to be pre-emptive or non-preemptive. State the principal problem with non-preemptive schedulers. Explain how pre-emptive schedulers solve this problem.

c) Explain why pre-emptive schedulers are more complex to implement.

d) Consider four CPU-bound processes arriving to a Shortest Remaining Time First (SRTF) scheduler as follows:

Process Arrival-Time Duration

P1 ------ 0 8

P2 3 3

P3 5 1

P4 9 4

i) Give a schedule computed by the Shortest Remaining Time First (SRTF) scheduler, and compute the average waiting time across all four processes. Your answer should be explicit about the state of each process and the ready queue at all times. Clearly state any assumptions you make.

ii) Explain why Shortest Remaining Time First (SRTF) scheduler is difficult to implement in practice and propose how to address this difficulty.

iii) Assume that jobs are no longer CPU-bound but also perform blocking and non-blocking IO. Discuss how this can affect the effectiveness and fairness of the Shortest Remaining Time First (SRTF) scheduler.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!