chapter three

3 How computers work

 

In this chapter

  • You learn the details of the hardware that executes your programs
  • You learn the organization of computer systems and common problem that it faces
  • You learn how to choose the hardware suitable for your problem

Twenty years ago, a working programmer could go for years on end without encountering a system that had more than one or at most two processing cores. That is no longer the case. Today, anything as big as or larger than a mobile phone has multiple cores, so a modern programmer’s mental model should be different too, encompassing multiple threads all running on different cores at the same physical moment.

When describing concurrent algorithms, it is not necessary to know the specific programming language in which the program needs to be implemented. However, it is necessary to understand the features of the computer system on which the algorithm will be executed. It is possible to construct the most effective concurrent algorithm by selecting the types of operations that most fully utilizes computer system hardware. To do this, it is necessary to clearly understand the potential capabilities of different hardware architectures.

In this chapter we will learn how different types of computer systems are structured which will be needed when developing a concurrent program as it gives us the benefit to take informed decision while designing the software.

3.1 Processor

3.1.1 Cache

3.1.2 CPU execution cycle

3.2 Runtime system

3.2.1 Operating system

3.3 Design of computer systems

3.4 Multiple levels of parallel hardware

3.4.1 Symmetric Multiprocessing architecture

3.5 Taxonomy of parallel computers

3.5.1 CPU vs GPU

3.6 Recap