Section 13.1
Computer Architecture
13.1 The Processor And Memory
13.1.1 Memory Addressing
A computers memory can be thought of as a series of boxes each containing one
byte (or more) of data.
Each memory location has its own unique address counting from zero up.
13.1.2 The Data And Address Bus
The CPU is connected to the main memory by two sets of wires (or buses).
- Address Bus
When the CPU wishes to access a particular memory location, it sends
its address down this bus
- Data Bus
The contents of the memory location requested are sent down this
bus.
13.1.3 Word Size
This is the number of bits that the CPU can process simultaneously.
The higher the word size, the faster the computer.
13.1.4 Processor Speed (Hertz, Hz)
The CPU carries out an action every time it receives a clock pulse. Its speed
is measured in cycles per second.
The clock pulses are a series of 1s and 0s.
13.1.5 Memory
Different sorts of memory chips can be used.
Memory Mapping
Some RAM is reserved for a special function (e.g. OSs or addresses and paramters
(on the stack)).
Memory allocated to different running applications must also be kept separate.
13.1.6 Cache Memory
Cache is a small amount of fast memory that acts as a intermediate store between
the CPU and memory.
It is fast because:
- It is close to the CPU
- It usually has high speed components
Two principles are used in decoding what data to copy from conventional RAM to
cache.
- Temporal Locality
An instruction that has been accessed once is likely to be accessed
again in the near future.
- Spatial Locality
It is likely that data items near previously accessed data items will
be accessed in the near future.