Computer Organization
Organization or Architecture?
- for us in computer science, this class is a back stage tour of the place we work (the computer)
- we'll study both the physical layout as well as the functional view
- architecture can be applied in a variety of ways in the computer arena
- microarchitecture (chip design)
- system/computer architecture (chipset design)
- machine architecture (package design)
- software architecture (how large software systems are designed)
- enterprise architecture (how organizations establish a computing infrastructure)
- from our (programmer's) vantage point, think in layers
- high-level language (e.g. java, c/c++)
- assembly language and compilers
- operating system
- instruction set architecture
- microarchitecture
- digital logic and circuits
- material science and signal processing
- it can get complicated fast, but there is a relatively simple story at its heart
Computer Anatomy 101
- programming in the 1940s: switches and plugs
- it was a glorified calculator that took a fleet of programmers to run
- John von Neumann's idea: give the calculator memory and a vocabulary
- the von Neumann architecture
- measurements: milli-, nano-, Kilo-, Mega-, Giga-, Tera-, bps/baud, 48X,
Hz
- understanding parts and pieces somewhat follows a biological analogy
- basic anatomy in seven easy pieces:
1) the central processor unit (CPU): the brain and an implied nervous system
2) short-term memory (RAM)
3) long-term memory (e.g. hard drives, flash, DVD, CD)
4) delegated processors (e.g. video cards, sound cards)
5) peripherals (e.g. mouse, keyboard, monitor)
6) power supply: the heart and an implied circulatory system
7) software (e.g. Windows/MacOS/Linux and browsers/spreadsheets)
- connecting tissue: motherboard, bus, a gazillion other cables/wires, and a cabinet
- basic processing (metabolic) pathways (consider how the anatomy is involved in each of these)
A) the instruction cycle: fetch > decode > execute > store [check
out this
simulator]
B) the storage game: concentric circles of memory
C) delegation and arbitration: layers of software, the virtual machine
D) first things: booting
E) doing something useful: starting and using an application
Motive: Transparency for Tuning and Diagnosing
- part of it is just so you know what's underneath you, your context
- this knowledge is power: better performance and better diagnostics
- understanding what the computer does with our programs can lead to code that is tuned to take advantage of what's underneath
- it can also help us when things don't work
- but the story from the system side of things is mostly about improving performance whether or not the programmer knows about it
- consider how we've packed more stuff into the same square inch
- the implication is we can do more per clock tick because we can do stuff in parallel
- and so, it's not just about the clock frequency; it's about finding what we can do at the same time
- by the way, some have a different view of this trend
- there are limits to what can be done in parallel
- consider Amdahl's Law for measuring the speedup by doing some things in parallel:
speedup = (run time on a single processor) / (run time on N processors) = 1 / [ (1 - f) + f / N ]
where f is the code (or work) that can run in parallel
- so how do we know if we're computing faster?
- one way is to measure how fast the computer runs instructions
- this sometimes involves computing the Cycles Per Instruction or CPI
- if you have this, you can figure out how many instructions per second the computer runs
- measures such as MIPS and MFLOPS do this sort of measuring
- however there is a bit of apples versus oranges problem with this
- so some punt on the more pure approach and settle for empirical results via benchmarks