10 Processors (math mod 9) 1,8 2,7 3,6 4,5 0,9 2,0 3,8 4,7 5,6 1,9 3,1 4,0 5,8 6,7 2,9 4,2 5,1 6,0 7,8 3,9 5,3 6,2 7,1 8,0 4,9 6,4 7,3 8,2 0,1 5,9 7,5 8,4 0,3 1,2 6,9 8,6 0,5 1,4 2,3 7,9 0,7 1,6 2,5 3,4 8,9 10 processors: Process 2 7,0,9,4,6,8,1,3,5 When processes communicate with other processes (IPC), it is usually (almost always) in the form of message passing. Your Linux box, your Windows machine, your Mac, all use message passing for interprocess communication. The other kind is shared memory. Processors share a block of memory, so one process can write something in that memory and another process can read it. This is less often used. You need specialized hardware for this sort of thing. In parallel programming course, usually shared memory is emphasized over message passing (including the one at NMU). And this is because so much theory has been worked out for shared memory that all these programming techniques and stratega have been worked out for this. Yet, in real life, you're more likely to encounter message passing. "If you want to write good shared memory code, the best way to do this is to write message passing code and then translate that to shared memory code." What is one situation on your regular desktop or laptop, in which you would be using shared memory? Threads used shared memory. Just as your processor use is split among various processors, each process is made up of threads which may be running different parts of the program at the same time. But threads all use the same memory within the process, so you can communicate by changing variables.