Re: Application priority

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi mate

This is the result of windows being 'fair' to all threads.

Indeed, it is - this is the main idea behind priority boosts. However,
it applies only to threads in the dynamic range - if thread priority is
in the real-time range, it will always run at its base priority (
priority boost cannot take thread from dynamic range to real-time one)

Read all about
it in MSDN by looking up SetThreadPriority.

In fact, "Windows Internals" provides much more detailed explanation of
the concept, compared to that of MSDN ........


Anton Bassov

m wrote:
This is the result of windows being 'fair' to all threads. Read all about
it in MSDN by looking up SetThreadPriority.

"anton bassov" <soviet_bloke@xxxxxxxxxxx> wrote in message
news:1157486835.355608.256230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi mate

How come that the rountrip times increase when Cpukiller runs at normal
priority even though my processes runs above normal priority?

You should clearly realize that, as long as thread priority falls into
the dynamic range,
priority in itself is quite relative thing - the system may increase
priority of a thread that
has not been active for quite a while. Apparently, when you have
specifed Normal priority, the target thread still has a chance to run
from time to time, due to priority boost
that gets applied by the system behind the scenes. Therefore, you get a
delay.

Anton Bassov

ixrob wrote:
Hi

I have a service running at high prio. My test app running above normal
priority communicates with a remote device via the service using tcp. The
request/response time is less than 20 ms. They take less tan 10% of the
cpu.

When I load the cpu to 100% with Cpukiller3 (an application which kills
cpu
time) running at Normal prio the request/response time increase to more
than
200ms. If I run Cpukiller3 Below Normal priority and load the cpu 100% I
get
my 20ms again (?).

How come that the rountrip times increase when Cpukiller runs at normal
priority even though my processes runs above normal priority?


.



Relevant Pages

  • Re: idprio safe?
    ... Priority propagation should prevent problems in theory. ... but it gives up control a lot so it is unlikely to cause deadlock. ... > background process will noticeably compete for CPU now. ... These essentially gave the same dynamic range for nice values ...
    (freebsd-current)
  • Re: without message queue
    ... When some given thread's quantum expires, the scheduler checks if some other thread of HIGHER priority is in ready state. ... If thread priority is in dynamic range, it gets decreased each time thread quantum expires, so that, with such approach, sooner or later some other thread will eventually get a chance to run. ... A simple experiment seemed to confirm this - priority 31 threads on my system context switches happened every 30ms or so in a round robin fashion. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: without message queue
    ... to RT oses,like windows CE,when setting highest priority for some running ... very important) priority is in ready state. ... dynamic range, it gets decreased each time thread quantum expires, so ... switches happened every 30ms or so in a round robin fashion (the threads ...
    (microsoft.public.win32.programmer.kernel)
  • Re: smpnice loadbalancing with high priority tasks
    ... presence of high priority tasks messes up load balancing of normal ... fourth cpu getting the remaining two normal tasks. ... extra normal priority task keeps jumping from one cpu to another cpu having ...
    (Linux-Kernel)
  • Re: high cpu usage
    ... > launch folders" to try it? ... > process' (Explorer, Tools menu, Options, View tab, Advanced settings). ... > that second explorer.exe process is started with HIGH priority. ... > player is running at normal priority and gets preempted by explorer). ...
    (microsoft.public.windowsxp.general)