Re: Thread Pre-Emption Question . . .
- From: "m" <m@xxx>
- Date: Fri, 9 Nov 2007 18:25:05 -0500
BTW: Running successfully does not _prove_ anything about the correctness
of a piece of software. It does demonstrate that any errors have low
(possibly zero) occurrence probability within the operating environment.
A failure does prove something about the correctness of a piece of
software - specifically that it is not correct ;)
That being said, I have not reviewed you code in detail; but it does seem
odd. And it is defiantly possible to construct a shared read, exclusive
write lock that allows acquisition of a read lock without always calling
WFXO.
As to the OP's problem (if he's even still listening): In general, one can't
know what is happening during a time when your thread(s) aren't running - if
you think about this, then it will become clear why Windows is not a RTOS
and why your task, unless it is a debugging / tuning process, is not
possible without OS / hardware support. If this is to debug a problem where
'sometimes the XXX hiccups because it took more than 40 ms', then run a test
with a large number of calls to your time critical function and use
GetThreadfTimes (or QueryPerformanceCounter or even perfmon) to compute the
average time required for each call and see if it is close to 40 ms. If it
is, then you have a problem; if it isn't then it is some other task on the
OS (IDE driver?) that is causing your problem.
The def'n of close depends on the reliability that you require. If you want
to quantify the probability of failure for a given call on a given hardware
and software platform, then you can take a large number of estimates of the
time required for one call (QueryPerformanceCounter) and, assuming
exponential distribution, analyze the distribution and compute the
probability (Excel can do the easily to a reasonable accuracy).
"Pops" <dude@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OUaVKGwIIHA.4272@xxxxxxxxxxxxxxxxxxxxxxx
Chris Thomasson wrote:
Your rw-mutex has way too much overhead for read access. You don't need
to acquire a lock (e.g., WriterMutex) in your ReadEnter/Leave functions.
Here is an example of how you can do it:
http://groups.google.com/group/comp.programming.threads/msg/cfdc3cec444b5544
Oh I see, you wanted to show us YOUR OWN WORK.
Cool.
Unfortunately, I can't trust your work until you can prove your
credentials and tell me where do you have this implemented and tested
under high loads. What products do you have this implemented in?
Also, what are your TCriticalSection::Check/Count functions used for?
Functions like that are usually a sign of poor design. The results you
get from those functions are not coherent wrt the current state of the
lock at any one time.
Baloney.
The fact our products are used by hundreds of thousands of customer for
nearly 12 years under 365x24x7 operating conditions, uncategorically
proves without the shadow of a double the HIGH QUALITY of the RPC
server/client system with absolutely NO multi-threads contention
conflicts.
Now, if you want to show HOW we can run into a problem with an example, I
am willing to listen. I'm too old to have regrets and have no problem is
there is a potential hidden issue. But I am not going to take YOUR blurted
out claims that your CODE is any better or worst. You have to prove it.
--
HLS
.
- Follow-Ups:
- Re: Thread Pre-Emption Question . . .
- From: Chris Thomasson
- Re: Thread Pre-Emption Question . . .
- From: Pops
- Re: Thread Pre-Emption Question . . .
- References:
- Re: Thread Pre-Emption Question . . .
- From: Pops
- Re: Thread Pre-Emption Question . . .
- From: Pops
- Re: Thread Pre-Emption Question . . .
- From: Pops
- Re: Thread Pre-Emption Question . . .
- From: Pops
- Re: Thread Pre-Emption Question . . .
- Prev by Date: Re: Thread Pre-Emption Question . . .
- Next by Date: Re: Thread Pre-Emption Question . . .
- Previous by thread: Re: Thread Pre-Emption Question . . .
- Next by thread: Re: Thread Pre-Emption Question . . .
- Index(es):
Relevant Pages
|