[cpp-threads] Alternatives to SC

Doug Lea dl at cs.oswego.edu
Sun Jan 14 22:14:02 GMT 2007


Jeremy Manson wrote:
> 
> 
> How do you find your students react to this?  I have actually always 
> thought that people would have a lot less of a hard time with the 
> concepts of concurrent programming -- even non-blocking / non-locking 
> concurrent programming -- with the right educational preparation.
> 
> I mean, honestly, I think non-blocking queues are simpler (by a fair 
> bit) than other things we expect undergraduates to understand, like quad 
> trees and B+ trees.
> 

Right. I'm sure my students understand CAS-based Treiber stacks better
than things like implementing read-write locks using plain locks and
conditions. They do usually complain though that my
project assignments are even worse than their B-Tree assignments
in the CS3 course here, so I don't think I'd push this too far :-)

And anyway, I think Herb has a different sort of "simplicity"
in mind -- for people who want to know as much about concurrency
as I want to know about, say, building tax-preparation software (i.e., as
little as possible). In those cases, you'd like to tell them
"Use this high-level framework that automates most of your
concurrency control needs, and when in doubt about anything else,
use a lock". Which is normally perfectly fine advice (and which
is of course irrelevant to the SC-atomics discussion).

-Doug






More information about the cpp-threads mailing list