Eric Niebler
Posts: 14
Nickname: ericne
Registered: Feb, 2005
|
|
Re: Trip Report: Ad-Hoc Meeting on Threads in C++
|
Posted: Oct 18, 2006 4:52 PM
|
|
> Standardizing existing practice is fine. The problem > is that existing practice is platform-specific due to > the significant differences between OS implementations > of threading.
And that's exactly why we need a standard -- so that nobody has to write platform-specific code if they don't want to.
This goes beyond a particular OS's implementation of threading, and right down to the hardware. Consider that an OS like Linux which runs on multiple platforms must "paper over" the hardware differences in order to present a coherent threading API. This is handled by a hardware abstraction layer. We're essentially doing the same thing, except that "papering over" actually consists of finding the core primitive operations supported by all modern computer hardware -- operations like atomic memory access, barriers and fences. Taken together, they define an abstract machine (not to be confused with a VM in the Java sense). Now, we define the semantics of C++ in terms of this abstract machine, and we have a sound basis on which to build multi-threaded C++ applications that are efficient and cross-platform.
-- Eric Niebler
|
|