Computer Systems - A Programmer’s Perspective
Book PDF
1: A Tour of Computer Systems
-
Everything - including files, programs, user data - is represented as bits. Executable code is just a context that data is viewed in. The same data may represent an integer, string, float, or an executable instruction depending on the context.
-
Compilation stages:
-
How a typical system is organised
- Buses are (electrical) conduits that typically transfer a word at a time
- IO devices connect via an adapter (external) or a controller (on-die/on-motherboard)
- The processor executes the instruction that PC points to in a loop
- DMA allows data (incl. executable code) to directly travel from disk to main memory
-
Data is moving from one place to another a lot, so caching is key
-
OS abstractions: processes, virtual memory, files *
A process is the operating system’s abstraction for a running program
- Maintaining this abstraction requires both hardware and kernel support
- Context switches between user and kernel modes
Stopped at 1.7.3