Multithreaded and Multicore Chips

Multithreaded and Multicore Chips

According to Moore's law, the number of transistors on a chip doubles every 18 months. This "law" is not like any law of physics, like conservation of momentum, but is an observation by Intel cofounder Gordon Moore of how fast process engineers at the semiconductor companies are able to shrink their transistors. Moore's law has held for three decades now and is expected to hold for at least one more.

The large quantity of transistors is leading to a problem: what to do with all of them? We saw one approach above: superscalar architectures, with several functional units. But as the number of transistors increases, even more is possible. One clear thing to do is put bigger caches on the CPU chip and that is definitely happening, but ultimately the point of diminishing returns is reached.

The clear next step is to reproduce not only the functional units, but also some of the control logic. The Pentium 4 and some other CPU chips have this feature, called multithreading or hyperthreading (Intel's name for it). To a first approximation, what it does is allow the CPU to hold the state of two different threads and then switch backward and forward on a nanosecond time scale. (A thread is a kind of lightweight process, which, in turn, is a running program; we will get into the details in "PROCESSES AND THREADS" For example, if one of the processes requires to read a word from memory (which takes many clock cycles), a multithreaded CPU can just switch to another thread. Multithreading does not offer true parallelism. Only one process at a time is running, but thread switching time is decreased to the order of a nanosecond.

Multithreading has implications for the operating system because each thread appears to the operating system as a separate CPU. Think of a system with two actual CPUs, each with two threads. The operating system will see this as four CPUs. If there is only enough work to keep two CPUs busy at a certain point in time, it may unintentionally schedule two threads on the same CPU, with the other CPU completely idle. This choice is far less efficient than using one thread on each CPU. The successor to the Pentium 4, the Core (also Core 2) architecture does not have hyperthreading, but Intel has announced that the Core's successor will have it again.

Further than multithreading, we have CPU chips with two or four or more complete processors or cores on them. The multicore chips of the following figure, effectively carry four minichips on them, each with its own independent CPU. (The caches will be explained below.) Making use of such a multicore chip will definitely need a multiprocessor operating system.

multithreaded and multicore chips


multithreading, hyperthreading, memory