CS411/511. Operating Systems

Maillist Archive, Spring 1999

Thread Index | Author Index | Subject Index | Date Index

Mail Index [Date Prev][Date Next][Thread Prev][Thread Next]

Multilevel queue

I think your confusion is that you are allowing a higher-priority process
to preempt a lower-priority one.

As I said in class on Wed., I have never heard of an operating system
that lets a *user* process preempt another user process.  The multilevel
queue is *preemptive* -- but in the sense that a quantum is set and the
running process is preempted by the OS when timerrunout occurs.  This is
not at all the same thing as saying that another user process can
preempt it.

In some systems, a high-priority OS process can preempt a user process.
But that's not what we look at in calculating the effectiveness of
scheduling algorithms.  We're interested in the turnaround, etc., for
*user* processes.

So your example is incorrect.  At time 2, C would arrive.  Because the
multilevel queue we discussed does not even have the concept of priorities,
C would go to the end of the queue.

*If* the multilevel queue were organized so that the queues are in order
of priority, C would go to the front of its queue, but it still would not
interrupt A's execution.  A will run until it terminates, blocks, or
experiences timerrunout.

=============================  yournote  ============================

I am a little confused on multilevel queue scheduling.

Consider a preemptive scheduling. There are two levels and within each
level FCFS applies. High level queue get time quantum of 2, low level
queue get 4.

Suppose at time 0, only process A and at time 1 process B arrive. Both 
A and B are of low priority. A is running. Then at time 2, process C with
high priority arrives, it will preempte A from CPU. Where will A be put in
in the low priority queue, at the front or at the end? A has not finish
its quantum, if still at front, A gains more advantage. If put at the end,
it is unfair. What is this suppose to do?



Thread Index | Author Index | Subject Index | Date Index