3 How computers work

 

In this chapter:

  • You learn the details of how code is executed on the CPU
  • You learn about the functions and goals of the runtime system
  • You learn how to choose hardware suitable for your problem

Twenty years ago, a working programmer could go for years without encountering a system that had more than two processing resources. Today, even a mobile phone has multiple processing resources. A modern programmer’s mental model needs to encompass multiple processes running on different processing resources at the same time.

When describing concurrent algorithms, it is not necessary to know the specific programming language to implement a program. It is necessary, however, to understand the features of the computer system on which the algorithm will be executed. You can construct the most effective concurrent algorithm by selecting the types of operations that most fully utilize computer system hardware. Therefore, you need to understand the potential capabilities of different hardware architectures.

Since the goal of using parallel hardware is performance, the efficiency of our code is a major concern. This, in turn, means we need a good understanding of the underlying hardware we are programming. This chapter provides an overview of parallel hardware so you can make informed decisions when designing software.

Processor

Cache

CPU execution cycle

Runtime system

Design of computer systems

Multiple levels of concurrent hardware

Symmetric multiprocessing architecture

Taxonomy of parallel computers

CPU vs. GPU

Recap