That means no shared memory. He helpfully makes this distinction on his front page ("I'm mostly interested in shared-memory system, so if you are looking for information about clusters, web-farms, distributed databases and the like, it's the wrong place")
According to Google's Jeff Dean, "to Google, multi-core computers look like separate servers with really fast interconnections" (i.e. memory).
So if you are running your applications on many machines anyway, you might as well drastically simplify your code by writing it "single-threaded" and running #cores copies on each machine.
Of course it's not. Hundreds of millions of people use just a single computer for a lot of tasks.
>you might as well drastically simplify your code by writing it "single-threaded" and running #cores copies on each machine.
It's not the worst approach. However there may be significant penalties in terms of performance and latency in some contexts. You are definitely don't want to use your approach for games and browsers. As for server software it depends on performance/latency requirements. For example, if you will use it in High-Frequency Trading marker, count you loose all your money.
However I leave them there just as a reminder that someone is footing the bill.
If someone doesn't like ads, then they can use an ad blocker :)
> and is most likely much faster. Or an order of magnitude slower.
Actually I'm not sure if it was supposed to be funny or serious. I see the funny "everything-free" list, as well as can imagine that there is some action you can do not atomically (relative to other actions) that gives you synchronisation.
Anyone?
An example of mutual exclusion, without any atomic operations, taken from the book "The art of multiprocessor programming"[1] is (paraphrased) as follows:
Two threads, A and B, want to access some memory. Each thread has a flag.
When thread A wants to access the shared memory:
Set flag A
Wait for flag B to become unset
Access memory
Unset flag A
When thread B wants to access the shared memory: Set flag B
While flag A is set {
Unset flag B
Wait for flag A to become unset
Set flag B
}
Access memory
Unset flag B
Obviously this isn't a general purpose solution, but rather an easy to understand example demonstrating that atomic operations are not required.[1] http://www.amazon.com/Art-Multiprocessor-Programming-Maurice...