Computer Systems: A Programmer’s Perspective

Vardan Grigoryan (vardanator)
Computer Science Reader
5 min readSep 21, 2019

Amazon link to the book.

Books that describe the fundamentals of computer organization do not dive into the topic from a programmer’s perspective. This book does what its title says, it dives into “computer systems” from “programmer’s perspective”. Almost every programmer is really curious about the inner details of program construction and execution. An ultimate goal for a programmer is to create a computer with bare hands and implement a program without a compiler (sounds kind of crazy, though).

If you’ve ever wondered about the details of an executable file loading into memory and the CPU instructions that actually execute the program, this book is for you.

The first chapters of the book are almost the same as other “computer organization” books, they tell us the story of computers, introduce to binary systems and so on. However, almost from the beginning, this book starts with a simple C program and shows how it’s compiled and then translated into machine code.

Chapter 1 (A Tour of Computer Systems) of the book is a regular introduction to the history of computers and their organization.

Part I, Program Structure and Execution

Chapter 2 (Representing and Manipulating Information) tells about representing and manipulating information. It touches topics such as binary numbers, their conversion to hexadecimal, etc. It also introduces addressing basics and bit-level operations in C. It’s important for the book to be written in a way that catches a programmer’s attention. This one does it really well.

Chapter 3 (Machine Level Representation of Programs) shows the reader how would a [simple] C program translate to machine code. This is one of the interesting chapters in the book.

Furthermore, Chapter 4 (Processor Architecture) introduces how CPUs work and what instructions make the CPU complete to the extent. The chapter discusses a Y86 processor family as some “generic” way to tell about Intel x86 family without actually mentioning Intel as much as it will sound like an advertisement.

Chapter 5 (Optimizing Program Performance) is a perfect resource for those programmers who are curious about the actual implementation of primitive constructs such as conditional statements and loops. It’s cool to find out that a simple goto statement along with conditional instructions (jmps) are enough to implement a complex loop.

Chapter 6 (The Memory Hierarchy) is one of my favorite chapters. Understanding the structure of computer memory along with the difference between the main memory and CPU cache (and others) is a topic that lays upon any successful project development. The chapter dives into cache memory and data locality (a super important concept for efficient coding).

Part II, Running Programs on a System

Chapter 7 (Linking) is important for C/C++ developers mostly. Languages like C# and Java are hybrid in terms of compilation and running. C++ programs should be linked first before executing. This chapter tries its best to describe the process of linking and loading. A must read!

Chapter 8 (Exceptional Control Flow), a boring chapter for me, but truly useful for understanding CPU interruptions and process lifecycle in general. The chapter is also useful to understand proper error handling mechanisms.

Chapter 9 (Virtual Memory) is a must read that is really a must read. The point is that your programs do not have direct access to the memory but rather are accessing a complex abstraction called virtual memory. Understanding virtual memory is almost the same as understanding how memory allocation/deallocation works, what is garbage collection, how are addresses translated from virtual to physical and so on. You might read this chapter first before starting the book from its beginning.

Part III, Interaction and Communication Between Programs

Chapter 10 (System-Level I/O). This chapter is good as a supplementary chapter, understanding the low-level details of file creation/manipulation, is definitely a great addition to your skills as a programmer. You can though omit this chapter if you are bored.

Chapter 11 (Network Programming) introduces the concept of sockets and the low-level details of socket programming. Though there are great books on network programming and a single chapter won’t be enough to master network programming on a professional level, this chapter would be a great introduction to the topic in general.

Chapter 12 (Concurrent Programming) is again, a good introduction to concurrent programming and multithreading in general. If you wish to dive into the topic you have to purchase a complete book on concurrency though. However, this chapter is more than enough for most of the programmers out there. You should read it and feel the joy of reading a book till its end!

As a summary, the book is a must read for every programmer to master fundamentals of computer systems. It doesn’t matter if you are a frontend JS developer, or a backend Java developer, or an Android developer, the book will help you to understand the low-level details of your programs and also will be a good help in preparing to programming interviews.

Final score

Useful for programmers: 10/10

Fundamental knowledge: 10/10

Real-world projects and examples: 7/10

Detailed and friendly: 9/10

Worth buying: 10/10

--

--