3 ms·
The list of things in the article that are 'actually hard' are all difficult problems, but I think the article glosses over the most important part: expected be
by kevingadd 17y ago
The list of things in the article that are 'actually hard' are all difficult problems, but I think the article glosses over the most important part: expected behavior.
If you're just trying to do some number crunching across sixteen cores, it might be pretty easy to figure out what the expected result is, since you can compare it with a single-core version of the algorithm in question to make sure your results are right. But what if you look at some real-world applications that are highly parallel?
For example, both World of Warcraft and Aion have suffered from multiple highly visible race conditions in their game mechanics. This might sound simple, but in practice players are able to actually identify those races and find ways to exploit them - sometimes it is possible to exploit them in such a way that the player is able to earn gold or other in-game rewards more rapidly than other players. Since you can often convert in-game rewards into real-world ones, I think you can see where that goes...
The most likely explanation in the above cases is that the people involved in writing the code just didn't have a good understanding of concurrency, but that can't be all there is to it, because if you watch closely, the same concurrency related issues crop up in games and related software all the time.
A significant issue here is that in complex systems, it can be impossible to distinguish between a race condition and expected behavior. If your game has a button labelled 'win match', and two players press the button, which one should win the match? Do you compare the timestamps on the TCP packets that say they pressed the button, ignoring the impact of network latency? Do you try and compare local time data from their machines, ignoring the impact of clock drift? What if, by some fluke of nature, they both send in a request with the exact same timestamp? In a simple case, you'd never see this, but when you have 11+ million customers playing on a daily/weekly basis, such things can happen.