Re: [NT] Quantum of interrupted process

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bill McKenzie (bill.mckenzie_at_nospam.conexant.com)
Date: 05/18/04


Date: Tue, 18 May 2004 09:31:43 -0500

Processes aren't scheduled, the thread is the scheduled entity in Windows
operating systems. Also, I believe a thread is not handed a time slice
until it is dispatched to run, so your scenario below where P2 is skipped
would never happen. However, you also have no view into the order in which
threads are scheduled so it shouldn't really matter either way unless you
are worried about starvation. I believe any interruption time that a thread
incurres will count against it's time slice.

-- 
Bill McKenzie
Software Engineer - Prism 802.11 Wireless Solutions
Conexant Systems, Inc.
"G. Turgij" <t0urguy@hotmail.com> wrote in message
news:c868tj$2kc$01$2@news.t-online.com...
> Hi there!
>
> Let's say we have three processes: P1, P2 and P3
> They are scheduled to run in this order: P1 -> P2 -> P3
> Execution is running in P1 and its quantum (Q1) is almost
> over.
>
> Now P1 is interrupted and control is passed to a KMD while IRQL
> changes to DISPATCH_LEVEL (or let's say a spinlock is active)...
>
> Now my question:
> Will Q1 be frozen and continued from the point when the interrupt
> occured, even if the kernel-mode code takes very long to execute?
>
> In other words: If Q1 and even Q2 would theoretically have passed
> during the kernel operation, will the scheduler switch to P3 with Q3
> set to what's left for P3  - OR - does it return to P1 with the original
> (frozen) Q1?
>
>
> Thanks in advance!
>
> > Gregor Turgij <
>
>


Relevant Pages

  • Re: [ANNOUNCE][RFC] PlugSched-6.3.1 for 2.6.16-rc5
    ... But anyway, based on the evidence, I think the problem is caused by the fact that the eatm tasks are running to completion in less than one time slice without sleeping and this means that they never have their priorities reassessed. ... The reason that it does this is that it gives newly forked processes a fairly high priority and if they're left to run for a full 120 msecs at that high priority they can hose the system. ... Having a shorter first time slice gives the scheduler a chance to reassess the task's priority before it does much damage. ...
    (Linux-Kernel)
  • Re: [ANNOUNCE][RFC] PlugSched-6.3.1 for 2.6.16-rc5
    ... problem is that it uses a smaller time slice for the first time slice ... full 120 msecs at that high priority they can hose the system. ... shorter first time slice gives the scheduler a chance to reassess the ... This is supposed to represent the task with the highest CPU usage rate per share and is used to determine how fairly CPU is being distributed among the currently active tasks. ...
    (Linux-Kernel)
  • Re: Blocking read() policy?
    ... >> It doesn't require any particular advanced scheduler. ... Especially if pgms demanding short latency ... that a CPU intensive process would ... starts over with the shortest possible time slice. ...
    (comp.os.linux.development.system)
  • Which Kernel for soft realtime on ARM 9
    ... The most critical area for that effect was detected to be the Oscheduler that uses much more code than the 2.4 Oscheduler, while with only some 10-20 processes the Oscheduler is not faster than the Oversion. ... Moreover the higher time slice scheduling rate of 1 instead of 10 msec results in unnecessarily increased overhead. ... I did some tests with that and I found that the patch does not help much, when the IDE driver is used for a non-realtime process that runs concurrently with a high priority realtime process. ... The embedded ARM project will not do too much IDE driver work, so maybe the Kernel preemption patch might do a better job here, but a compact flash drive is planned be included and used sporadically. ...
    (comp.os.linux.embedded)
  • Informations about FreeBsd for University Project
    ... developing a project called "Scheduling Algorithms In Modern Operating Systems" ... me if you could drive me to some good articles or any other type of documents ... It'd be usefull to have infos on how it's changed FreeBSD scheduler ...
    (freebsd-questions)