Pass 2

Boehm, Hans hans.boehm at hp.com
Fri Sep 10 18:44:03 BST 2004


Some more suggestions/corrections:

Should we remove mention of "word tearing"?  The use of this label here is unintuitive (nothing is being "torn").  Based on an email discussion with David Butenhof, I'm also not sure that this is the accepted use of the term outside JSR133.  It makes more sense to use it to describe the lack of atomicity you get with unaligned writes, though the two are related.

Just replace " "word tearing" " with "structures with small fields"

Volatiles section:

I'd make this more tentative:
"volatile has the extra burden" --> "it may be useful to have volatile take on the extra burden"

the the {\tt volatile} --> delete "the"

{tt volatile} should be {\tt volatile}

Atomics:

I don't think we've gotten this right, yet.  That's fine for now.
But let's again make it sound more tentative.

"The most promising of them is to"  --> "For example, one might"

(The more I think about this, I would break this up into two
templatized classes, one for operations like CAS that make
sense for essentially all data, and one for those like
getAndAdd that require arithmetic.  And we need a feature test
facility.  Thus you could ask whether atomic<int> implements
compareAndSet.  There shouldn't be any reason not to provide
atomic<struct{short x; short y}>.  And I still think we
need to make the ordering more explicit, possibly as a template
parameter.  There are way too many useful definitions of "weak".)

Section 5:

I'm not at all sure we want to go here.  ACE and Boost already
tried, right?  And my experience has been that in practice there
are quite serious differences between pthreads and raw win32 threads
(cf. http://www.cs.wustl.edu/~schmidt/win32-cv-1.html),
though I think CLI moves to a model much closer to that of pthreads.
I expect you'll always see a fair amount of code that goes
directly to the underlying library.

Hans

> -----Original Message-----
> From: Ben Hutchings [mailto:ben at decadentplace.org.uk]
> Sent: Friday, September 10, 2004 7:39 AM
> To: Doug Lea
> Cc: Kevlin Henney; Andrei Alexandrescu; Hans Boehm; Doug Lea;
> pugh at cs.umd.edu; Scott Meyers
> Subject: Re: Pass 2
> 
> 
> I've made a few fixes and am attaching a diff.  The fixes cover
> - typos
> - grammar/editing errors
> - use of the term "memory barriers" without explanation
> - correction of names
>   - "PowerPC", not "powerpc"
>   - "POSIX threads", not the redundant "POSIX pthreads"
> - hyphenation
> The last of these might be slightly contentious.  I removed the hyphen
> from "multi-threading" in the abstract since it is used without a
> hyphen later on.  If this inconsistency was deliberate, please ignore
> the change.  In other places I have added hyphens where I think the
> joining of words is obscure: "multi-core", "inter-thread".
> I seem to remember that TeX treats hyphens as soft by default, in
> which case I think some of the hyphens ought to be made hard.
> Ben.
> -- 
> Ben Hutchings
> In a hierarchy, every employee tends to rise to his level of 
> incompetence.
> 






More information about the cpp-threads mailing list