📅 2012-Apr-10 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ book, computer architecture ⬩ 📚 Archive
I picked up Computer Systems: A Programmer’s Perspective (2nd Edition) by Randal Bryant and David O’Hallaron while searching for a stimulating book on computer architecture or operating systems. CSAPP turned out to be a good find since it is aimed at the intersection of computer architecture, computers systems and OS. Using practical examples and problems the book walks the student through all the hardware and software knowledge that is required to understand how a program comes to life on a computer.
Assume a student compiles a Hello world program and runs it. A plethora of hardware features and a large set of software come together to make this simple magic possible. Software like compiler, assembler, linker, loader, libraries and operating system kernel help to compile and load the program. Hardware features like hard disk, main memory, controllers, buses, cache and the processor bring the program to life. Also, hardware and software need to also act in tandem in virtual memory, system calls and interrupt handling to make the execution of a program scalable, efficient, fast and safe. This book argues that a good programmer needs to be aware of all the afore mentioned concepts and these are what the book tries to cover.
Some notes about this book:
The book is structured as a workbook. You read a concept, solve a problem or experiment with a program that illustrates it and then move on to the next concept. There are trivia, blurbs and practical information about IA32 (Intel) architecture and Linux where-ever necessary. This ensures that the book remains grounded in reality and never feels dry to study.
The authors have tried their best to introduce as many of modern multiprocessor concepts as possible in a practical way. There is a lot missing, for example, super-scalar architecture and out-of-order execution. However, the programmer interested in these details can easily learn about them with a book like Inside The Machine.
The chapters on memory hierarchy and virtual memory are the real treasure in this book. The sections on cache here and in Inside The Machine stand head-to-head as the most practical introductions to the topic.
Virtual memory is an important concept, but sadly it gets short shrift in computer science education. This is because it requires the OS and hardware to work together and those subjects are typically covered by two different courses or textbooks in university. Not having to deal with such caste boundaries, this book is able to show the student how virtual memory is brought to life.
The book gets a bit vague towards the end. I was not interested in and did not see any benefit for this book to touch on areas of system I/O, network programming and concurrency.
I am happy to conclude that CSAPP is a stimulating book to study and work through. This book covers all the knowledge that a good programmer needs to understand how his program executes upon the OS and CPU and how to make it efficient, fast and scalable. I highly recommend Computer Systems: A Programmer’s Perspective for anyone who feel they need a better grasp of these ideas.