Re: Why are Boost thread mutexes so slow compared to Pthreads?



In article news:<N_M3l.8487$cL7.2218@xxxxxxxxxxxx>, Chris M. Thomasson
wrote:
Exactly how would you accomplish that?

I suspect that answer to that is partly "implementation defined" and
partly "maybe you can't". Most systems provide some sort of signal that
an application can handle even when it's being shut down forcibly and
that (where available) can clearly be used to trigger some sort of
cleanup operation (when necessary) -- it's analogous to exception
handling so shouldn't be rocket-science (where the facilities exist at
all).

How are you going to ensure that a user never terminates a process
while it holds an inter-process synchronization object?

You're talking about process assassination rather than any orderly
shutdown. In general users shouldn't do that -- and shouldn't /have/ to
do that ... and (unless they're root/Administrator) probably *can't* do
that. It is not a "normal" event. I can't say that I'm particularly
worried if it occasionally ends in tears.

IMVHO, its is usually very hard and tedious to introduce robust
fail-safe features into process-wide applications...

It *shouldn't* be hard -- it certainly shouldn't be as hard as it
actually is in practice -- and it *needn't* be tedious. We're starting
to understand the problems associated with exception (/sensu lato/)
safety and starting to develop idioms and to build support into
libraries and frameworks that make exception-safe programming easier
and less tiresome.

It's also becoming obvious that as per-thread throughput reaches
physically-imposed limits we need to rely more and more on multiple
threading and multiple tasks to achieve high performance and
throughput, and that some of these synchronization problems that have
always seemed a little esoteric and outside the purview of the average
jobbing programmer are going to become bread-and-butter work for us
all.

Cheers,
Daniel.





.



Relevant Pages

  • Re: PILLARS OF THE EARTH (no spoilers)
    ... And it's a recommendation that I ... second for any viewer not above this sort of flagrant mass-appeal ... I loved the sets and the costumes and the cast and everything about it, with the exception of "it". ...
    (rec.arts.movies.current-films)
  • Re: Handling invalid objects
    ... If Java did it wrong, let's do it right in Ada. ... there is a cascading effect when someone on one end of the chain adds a new exception type. ... Above, the call chain is myFun->sort->myComparator, but the error handling and reporting is the business which is agreed between myFun and myComparator only. ... The sort algorithm was written long before myFun and myComparator and it does not care what it sorts and for whom. ...
    (comp.lang.ada)
  • Re: Debugging an exception log
    ... on some machines the exception never occurs ... You make it sound like it could be some sort of overflow or wraparound ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [PATCH 1/8] lib/sort: Heapsort implementation of sort()
    ... >> This patch adds a generic array sorting library routine. ... Sort isn't inlined, ... - * stack may be more than 2GB away from the exception-table). ... * Sort the exception table. ...
    (Linux-Kernel)
  • Re: Sort on groups of rows?
    ... as there may be multiple Tasks for one Project. ... I looked in MS Templates for something similar, ... DatesDue and Priorities--sortable by Project Number or Project Name where the ... sort and view them as a whole. ...
    (microsoft.public.excel)