Hello Everyone,
It is well documented the priority levels for processes and threads.
Does anyone knows if Microsoft applies any distribution function
for processing pending threads? The reason i ask is that i am building
a driver that handles a home-made PCI board. The system is simulating
a 3rd telecommunication node that handles signalling and userplane messages.
Signalling is handled by the driver. The network can produce signalling
traffic
in order to simulate several distribution functions. So i am very concerned
about undesirable signalling queue growth.
Thank you in advance.
Nikolas Stylianides
Hi Nikolas,
Look in the Solomon and Rusinovich. It will give the best insight of the processes and thread and their scheduling.
Good Luck,
From: “Nikolas Stylianides”
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] Threads processing distribution
>Date: Mon, 19 Jan 2004 12:52:29 +0200
>
>Hello Everyone,
>It is well documented the priority levels for processes and threads.
>Does anyone knows if Microsoft applies any distribution function
>for processing pending threads? The reason i ask is that i am building
>a driver that handles a home-made PCI board. The system is simulating
>a 3rd telecommunication node that handles signalling and userplane messages.
>Signalling is handled by the driver. The network can produce signalling
>traffic
>in order to simulate several distribution functions. So i am very concerned
>about undesirable signalling queue growth.
>
>Thank you in advance.
>
>Nikolas Stylianides
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
Send DD, pay no commission. Click here.
Then you’re interesting in distributing DPCs and not threads 
Usually, the DPC is scheduled on the same CPU who was hit by the ISR. The
ISR distribution is the job of HAL software and PIC hardware, and is usually
considered to be fair, unless you have set an explicit affinity on the
interrupt vector.
As about the thread distribution - the rules are:
- hard affinity overrides every other stuff and prohibits the threads
from running on some CPUs, regardless of any other stuff.
- then the priority starts to play. A CPU will never abandon the thread
in favour of the thread with a priority lower (the the currently executing
thread), and will always switch to a ready thread if its priority is higher.
- then the “ideal processor” starts to play. Some threads have “ideal
processor” setting, and the CPU (given the affinity and the priority conditions
are met) will prefer the thread for which it is an ideal processor.
- then the “last processor” starts to play. If all other conditions are
equal, the CPU prefers the thread which runned last on it, and not on other
CPU.
The quantum end situation (“task switching by timer”) occurs - as it is
obvious - only on 100% CPU load and means moving the current thread to the tail
of its priority list. The CPU then picks the thread from this same priority
list according to “ideal processor” and “current processor” rules.
There is also a startvation prevention. Low-priority threads are boosted to
high-priority once per second or such. Then this boost decays.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Nikolas Stylianides”
To: “Windows System Software Devs Interest List”
Sent: Monday, January 19, 2004 1:52 PM
Subject: [ntdev] Threads processing distribution
> Hello Everyone,
> It is well documented the priority levels for processes and threads.
> Does anyone knows if Microsoft applies any distribution function
> for processing pending threads? The reason i ask is that i am building
> a driver that handles a home-made PCI board. The system is simulating
> a 3rd telecommunication node that handles signalling and userplane messages.
> Signalling is handled by the driver. The network can produce signalling
> traffic
> in order to simulate several distribution functions. So i am very concerned
> about undesirable signalling queue growth.
>
> Thank you in advance.
>
> Nikolas Stylianides
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Max, it’s worth noting that Intel didn’t try for a “fair” distribution with
either P4 or Itanium. Interrupts go to the lowest numbered targetted
processor.
–
Jake Oshins
Windows Base Kernel Team
This posting is provided “AS IS” with no warranties, and confers no rights.
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> Then you’re interesting in distributing DPCs and not threads 
>
> Usually, the DPC is scheduled on the same CPU who was hit by the ISR.
The
> ISR distribution is the job of HAL software and PIC hardware, and is
usually
> considered to be fair, unless you have set an explicit affinity on the
> interrupt vector.
>
> As about the thread distribution - the rules are:
> - hard affinity overrides every other stuff and prohibits the
threads
> from running on some CPUs, regardless of any other stuff.
> - then the priority starts to play. A CPU will never abandon the
thread
> in favour of the thread with a priority lower (the the currently executing
> thread), and will always switch to a ready thread if its priority is
higher.
> - then the “ideal processor” starts to play. Some threads have
“ideal
> processor” setting, and the CPU (given the affinity and the priority
conditions
> are met) will prefer the thread for which it is an ideal processor.
> - then the “last processor” starts to play. If all other
conditions are
> equal, the CPU prefers the thread which runned last on it, and not on
other
> CPU.
>
> The quantum end situation (“task switching by timer”) occurs - as it
is
> obvious - only on 100% CPU load and means moving the current thread to the
tail
> of its priority list. The CPU then picks the thread from this same
priority
> list according to “ideal processor” and “current processor” rules.
>
> There is also a startvation prevention. Low-priority threads are
boosted to
> high-priority once per second or such. Then this boost decays.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “Nikolas Stylianides”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, January 19, 2004 1:52 PM
> Subject: [ntdev] Threads processing distribution
>
>
> > Hello Everyone,
> > It is well documented the priority levels for processes and threads.
> > Does anyone knows if Microsoft applies any distribution function
> > for processing pending threads? The reason i ask is that i am building
> > a driver that handles a home-made PCI board. The system is simulating
> > a 3rd telecommunication node that handles signalling and userplane
messages.
> > Signalling is handled by the driver. The network can produce signalling
> > traffic
> > in order to simulate several distribution functions. So i am very
concerned
> > about undesirable signalling queue growth.
> >
> > Thank you in advance.
> >
> > Nikolas Stylianides
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>