Important Linux update

Discussion of chess software programming and technical issues.

Moderator: Ras

F. Bluemers
Posts: 880
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

Re: Important Linux update

Post by F. Bluemers »

michiguel wrote:
F. Bluemers wrote:doh :shock:
well,That last one if from May 2003
the other one from October 2006.
He just gained insight :lol:
Best
Fonzy
http://www.cs.wustl.edu/~schmidt/win32-cv-1.html

Aren't condition variables an important feature?
Yes but only if you don't have semaphores:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
Are they available only in Vista or what?
http://msdn.microsoft.com/en-us/library ... S.85).aspx

Miguel
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Important Linux update

Post by michiguel »

F. Bluemers wrote:
michiguel wrote:
F. Bluemers wrote:doh :shock:
well,That last one if from May 2003
the other one from October 2006.
He just gained insight :lol:
Best
Fonzy
http://www.cs.wustl.edu/~schmidt/win32-cv-1.html

Aren't condition variables an important feature?
Yes but only if you don't have semaphores:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
They are not the same thing...

There are some attempts in the literature to implement ("hacked") a version of condition variables, using semaphores and other tricks. The conclusion is that it is extremely tricky and potentially dangerous.

I am not an expert on this area at all. I am interested becasue I am trying to find the best approach to make my SMP version as portable as possible. Even when I lack experience on this, I think that claiming superiority of Win32 Threads over pthreads is beyond ridiculous.

From my perspective of a newbie in parallel programming, I find the specifications of pthreads relatively clear. Every time I tried to read something about Win threads is a mess. The article claims that having everything as HANDLE is good. Really? Why is that there are many different ways to create a thread. For instance, it is recommended to create those with _beginthredex rather than CreateThread. The whole specification looks like a hack over another hack.

Miguel
Are they available only in Vista or what?
http://msdn.microsoft.com/en-us/library ... S.85).aspx

Miguel
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Important Linux update

Post by bob »

michiguel wrote:
F. Bluemers wrote:doh :shock:
well,That last one if from May 2003
the other one from October 2006.
He just gained insight :lol:
Best
Fonzy
http://www.cs.wustl.edu/~schmidt/win32-cv-1.html

Aren't condition variables an important feature?

Are they available only in Vista or what?
http://msdn.microsoft.com/en-us/library ... S.85).aspx

Miguel
There are a dozen parallel programming constructs that fall out of the basic atomic lock mechanism. Condition variables are just one of many different ideas, from counting semaphores, to barriers and on up. With regard to chess, my goal is to always minimize waiting/spinning/blocking which is doing no useful work. Given that goal, atomic locks are all that one needs to do a high-performance parallel search.