Computer Organization and Design: The Hardware and Software Interface
Technical Books
In Progress
My notes & review of Computer Organization and Design: The Hardware and Software Interface by John L. Hennessy, David A. Patterson
Notes
Preface
Chapter 1: Computer Abstractions and Technology
1.4. Under the Covers
- The five classic components of a computer are input, output, memory, datapath, and control, with the last two sometimes combined and called the processor.
- Access times for DRAM in the 50 nanoseconds range.
- Access times for flash is in the 5 to 50 microseconds range.
- Access times for hard disk is in 5 to 20 ms range.
- Flash memory bits wear out after 100,000 to 1,000,000 writes
1.5 Technologies for Building Processors and Memory
- Transistor is an on/off switch controlled by electricity
1.6. Performance
- wall clock time, response time, elapsed time all refer to the total time to complete a task
- CPU time only looks is the time CPU spends computing and does not include time spent time waiting for I/O.
- Hertz measures cycles per second. If a complete clock clock cycle takes 250 picoseconds then you would get 1/250x10-12 = 4x10^9 or 4GHz
- The average number of clock cycles each instruction takes to execution is called clock cycles per instruction or CPI
- Instructions per clock cycle (IPC) is the inverse of CPI
- Clock rate is the inverse of clock cycle time
1.7. The Power Wall
- CMOS stands for complementary metal oxide semiconductor
- Current problem with microprocessor improvement is lowering voltage makes the transistors too leaky, like water faucets that cannot be completely shut off. 40% of power consumption in server chips is due to leakage.
1.8. The Sea Change: The Switch from Uniprocessors to Multiprocessors
1.11. Historical Perspective and Further Reading
Chapter 2: Instructions
2.1. Introduction
- Stored-program is the idea instructions and data of many types can be stored in memory as numbers and thus easy to change.
2.2. Operands of the Computer Hardware
- word a natural unit of access in a computer, usually a group of 32 bits.
- data transfer instruction is a command that moves data between memory and registers.
- load is the data transfer instructions that copies data from memory to a register. This is called load word in RISC-V
- The register added to form address is called the base-register and the constant is called the offset.
- store copies data from register to memory. This is called store word in RISC-V.
- alignment restriction is when words must start at address that are multiple of 4 (remember a word is 4 bytes, 32 bites). RISC-V and Intel x86 do not have alignment restrictions.
- The process of putting less frequently used variables into memory is called spilling registers.
- add immediate is a quick add instruction to add one constance operand. This avoids having to call a load.