linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Re: scheduler policy]
@ 2001-09-14  4:41 shreenivasa H V
  2001-09-14  7:44 ` george anzinger
  0 siblings, 1 reply; 2+ messages in thread
From: shreenivasa H V @ 2001-09-14  4:41 UTC (permalink / raw)
  To: Mike Kravetz, shreenivasa H V; +Cc: linux-kernel

thanks, and I have a related question. Consider we have only 2 processes with
equal priority. Now one of them is switched out for an i/o operation. The
second one gains the cpu and executes past its time quantum. Since the other
process is not yet ready this process continues to enjoy the cpu. Now will
this usage be accounted for a new time quantum for this second process or will
it be unaccounted. According to what I understand, the second process will not
start its new time quantum until the epoch has ended i.e., the first one also
has finished its time quantum. So does this mean the epoch will never end
until there is a process in the system who's time quantum is yet to be
expired? 

shreeni.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Re: scheduler policy]
  2001-09-14  4:41 [Re: scheduler policy] shreenivasa H V
@ 2001-09-14  7:44 ` george anzinger
  0 siblings, 0 replies; 2+ messages in thread
From: george anzinger @ 2001-09-14  7:44 UTC (permalink / raw)
  To: shreenivasa H V; +Cc: Mike Kravetz, linux-kernel

shreenivasa H V wrote:
> 
> thanks, and I have a related question. Consider we have only 2 processes with
> equal priority. Now one of them is switched out for an i/o operation. The
> second one gains the cpu and executes past its time quantum. Since the other
> process is not yet ready this process continues to enjoy the cpu. Now will
> this usage be accounted for a new time quantum for this second process or will
> it be unaccounted. According to what I understand, the second process will not
> start its new time quantum until the epoch has ended i.e., the first one also
> has finished its time quantum. So does this mean the epoch will never end
> until there is a process in the system who's time quantum is yet to be
> expired?
> 
Your question is a little confused so I will just say what happens.  The
epoch (as you call it) ends when all run able tasks in the run list have
zero quantum.  At this time the quanta of all tasks ON THE SYSTEM are
adjusted by keeping 1/2 of what they have and adding a new value that
depends on the NICE value of the task.  Thus the task waiting for I/O
will surly have a higher quantum than the running task and when it is
unblocked, will get the cpu at the first context switch opportunity (at
interrupt completion if the running task is in user land, at completion
of the system call if in the system).

(A task can be on the run list and not run able in and SMP system if it
is locked to another cpu.  Such a tasks quantum will not be examined to
determine the end of the epoch.)

George

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-14  7:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-14  4:41 [Re: scheduler policy] shreenivasa H V
2001-09-14  7:44 ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).