Shared Memory and Multi-Core Technology

Around the year 2000, processor manufacturers hit what is known as the power wall, a barrier to clocking computer processors faster than about 3 GHz due to the inability to dissipate the heat generated. The laws of thermodynamics indicate that all energy put into any system (machine, biological organism, solar cell, etc) is ultimately converted to heat. Increasing the speed of a CPU causes it to generate heat faster. All heat generated must be conducted through the materials in the chip to the surface and then dissipated by a cooling system. While this hurdle will likely be overcome eventually, the industry has realized that processor clock speeds cannot grow indefinitely, and have therefore turned their focus toward improving efficiency and parallelism.

As a result, most personal computers now come with multiple cores. Core is the modern term for what has been traditionally known as the Central Processing Unit (CPU) or simply processor. The term core refers to a functional CPU. For a long time before the age of multi-core technology, processor chips traditionally contained a single core, so CPU and core could be used synonymously. Hence, the term CPU has been widely used to refer to either the functional CPU or the physical chip. Now that the assumption of one CPU per chip is no longer valid, the term CPU has become somewhat ambiguous. It could refer to either a core, or a chip containing multiple cores. The term core is preferred when referring to a functional CPU.

Each core is capable of running it's own thread, or sequence of instructions. Hence, a multi-core CPU chip can run multiple processes at the same time, or multiple instructions of the same process.

Since these multiple cores are part of the same computer, they all have access to the same memory bank. This allows the multiple threads to share information very easily. The disadvantage of shared memory is that only one core can access a memory chip at a given time. As we increase the number of cores, we increase the likelihood of contention for accessing each memory chip, just as a bigger family has more contention for the bathroom. Therefore, the number of cores that can truly work in parallel is very limited, i.e. shared-memory architectures don't scale well. Adding more than a few dozen cores to a computer typically shows diminishing returns in terms of speedup. E.g. a 128-core computer won't be able to do twice as much computation as a 64-core computer in the same amount of time, since cores spend more time waiting for their turn to access memory.

Practice

Note

Be sure to thoroughly review the instructions in Section 2, “Practice Problem Instructions” before doing the practice problems below.
  1. What is the power wall and what causes it?

  2. How has the industry responded to the power wall?

  3. Explain the difference between a core and a CPU.

  4. What is shared memory parallelism?

  5. What is the main advantage of shared memory parallelism from the programmer's perspective?

  6. What is the main disadvantage of shared memory parallelism from the programmer's perspective?