Wed, 23 Sep 2009 15:09:59 +1000, Daniel Keep thusly wrote: > See, people equate "parallel execution" with "threads" these days which > is half the problem. Threads are a TERRIBLE abstraction, because they > don't. There's no protection. Almost every time I express the opinion > that threads are broken, people automatically assume I think we should > all go back to single-core machines and cooperative multitasking.
Threads come up every once in a while since they are one of the only ways to implement concurrency on the hardware level of shared memory machines. Another alternative is message passing. There just are no intelligent, dynamic low level models that provide e.g. abstractions and protection. Once you realize this, the only way to build safe concurrent systems is to provide a safe high level abstraction on top of the hardware and transform programs written using this abstraction to use low level threads and messages. As the amount of concurrent threads keeps increasing, you start to value models that prevent things like deadlocks, starvation, and accidental concurrent writes to the same location.