Re: profiler which does not just sum up used time
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Wed, 9 Jan 2008 10:58:43 -0600
"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.
.
- References:
- profiler which does not just sum up used time
- From: Joe Withawk
- Re: profiler which does not just sum up used time
- From: Marc Gravell
- Re: profiler which does not just sum up used time
- From: Joe Withawk
- Re: profiler which does not just sum up used time
- From: Willy Denoyette [MVP]
- Re: profiler which does not just sum up used time
- From: Joe Withawk
- profiler which does not just sum up used time
- Prev by Date: Re: Textbox background color
- Next by Date: Get URL to newly created Virtual Directory
- Previous by thread: Re: profiler which does not just sum up used time
- Next by thread: Re: profiler which does not just sum up used time
- Index(es):
Relevant Pages
|