[cpp-threads] Fixing the thread type

Alexander Terekhov alexander.terekhov at gmail.com
Tue Nov 22 11:28:04 GMT 2005


On 11/21/05, Boehm, Hans <hans.boehm at hp.com> wrote:
[...]
> [1] I did finally get a chance to look at the RedHat Pthreads-on-windows
> implementation, as I had promised to during the C++ meeting.  Based on a
> quick reading, I didn't get the impression that this adds a huge amount
> of overhead, though it clearly adds some.  Thus it does seem reasonable
> to me to require the basic Pthreads primitives as part of any C++
> threads standard.  In particular, the cost of uncontended locking
> doesn't seem to be affected much.  Condition variable primitives are
> more expensive, but I would guess that that cost is still no more than
> on the same order as the context switch.  I expect that both Doug and
> Alexander can comment more authoritatively.

I can comment that apart from emulating pthreads on top of Win32-proper
a la pthreads-win32 (better critical sections, rwlocks without read-or-
write preference, sema based condvars, and DCSI were mostly sorta
academic exercise for me personally), MS itself has free (as in free
beer) Windows add-on (UNIX "subsystem technology")

http://www.microsoft.com/windowsserversystem/sfu/downloads/default.mspx
(not only for servers)

which (as of version 3.5)

http://www.microsoft.com/windowsserversystem/sfu/productinfo/features/whatsnew.mspx

"has been enhanced to support multi-threaded applications with the
addition of a full set of pthread APIs. Pthreads are POSIX-compliant
threads, a standards-based mechanism for providing concurrent code
execution in a single program. The Interix SDK includes nearly 100
new APIs—those beginning with "pthread" and "sem" in the
/usr/include/pthread.h header file—that support pthreads and
semaphores."

regards,
alexander.


More information about the cpp-threads mailing list