Re: profiler which does not just sum up used time




"Joe Withawk" <no@xxxxx> wrote in message
news:4784f007$0$7604$157c6196@xxxxxxxxxxxxxxxxxxxxxxxx
To conclude, on a system with only one or two CPU's (cores) a higher
priority thread will run for at most ~5 second before it will get
pre-empted. The time it will get off a CPU depends on the other threads
activity, but keeping a single core busy for such a long period (~5
seconds) will probably accumulate that much lower priority threads to
become ready, so that your thread will get pre-empted for at a complete
quantum or more.

Thanks for the details. I was aware that to prevent starvation the threads
would over time build up priority. I did however beleive that their
priority would never go above high.

http://msdn2.microsoft.com/en-us/library/ms685100(VS.85).aspx
http://msdn2.microsoft.com/en-us/library/ms684828(VS.85).aspx

An application can be set to realtime priority and according to what I
have read, this should prevent preempting entirely, but that still does
not seem to be the case.. Or perhaps it has to do with me not being able
to set a threads priority to realtime. Only the application can be
realtime.

How would you suggest that I move on now? I have an app doing rendering
and it occationally gets preempted (or so I beleive, can I test is this is
indeed the cause somehow?) and when that happens I lose a few frames. I
can not live with even a single lost frame unless the rendering is very
complex, which it is generally not. What could be a solution to this?

If you have already thoroughly debugged your application and you trust it
not to lockup the entire system, you could set REALTIME_PRIORITY_CLASS for
your entire process.

A better way would be to increase the buffer so it doesn't
overflow/underflow during a short delay.


.



Relevant Pages

  • Re: DirectShow Thread Priority
    ... > I'm not persuaded that it does run at a higher priority. ... other CPU-intensive tasks going on during video rendering, ... will take most of the CPU time anyway. ... difference in performance by the encoder. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Time critical thread seems to pause briefly once every few seconds
    ... It runs on a dual core system with windows vista and xp. ... prepare for rendering; ... Generally with two cores and few processes, I beleive the core running the critical thread will be more or less reserved for the thread and the other core will be uses for low priority work. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Mexican customs to be stationed in Kansas City
    ... Chas wrote: ... rendering them irrelevant. ... Neither does raw capitalism take priority over every other consideration. ...
    (rec.martial-arts)
  • Re: profiler which does not just sum up used time
    ... The time it will get off a CPU depends on the other threads activity, but keeping a single core busy for such a long period will probably accumulate that much lower priority threads to become ready, so that your thread will get pre-empted for at a complete quantum or more. ... An application can be set to realtime priority and according to what I have read, this should prevent preempting entirely, but that still does not seem to be the case.. ... I have an app doing rendering and it occationally gets preempted and when that happens I lose a few frames. ... I can not live with even a single lost frame unless the rendering is very complex, ...
    (microsoft.public.dotnet.languages.csharp)
  • Windows ntpd highest priority doesnt require admin access
    ... ntpd on Windows attempts to raise itself to the realtime priority ... high priority class instead. ... special privilege to raise priority to realtime, ... Meinberg's installer adds the needed privilege for us. ...
    (comp.protocols.time.ntp)

Quantcast