1. Memory - Two catagories
a. Primary - directly addressable by cpu
registers, main memory, cache
b. Secondary - symbolically addressable with help of hardware & software
hard drives, cdroms, floppies and other removables
2. Units - Basic Memory Units
a. 1 bit (atomic)
b. 8 bit byte - smallest practical unit. 256 values
c. Word - 16 bit or 32 bit depending on system design.
d. Sector - generic unit used by secondary storage, 512 bytes common.
e. Stripe or cluster - sets of sectors used for manipulating large blocks
of data.
3. Data arrangement
a. Data arrangement based on design of cpu and bus.
b. A stored value may span several bytes of storage
i. Little endian - The lower portion of the value being stored is stored
in the lower or starting address of memory.
ii. Big endian - The higher portion of the value being stored is stored
in the starting address of memory.
4. Little endian, Big endian example
Storing the 16 bit hex value 0042 and the string "howdy"
a. Memory locations
b. @ 10 11 12 13 14 15 16 17 18
c. Little endian
d. 42 00 h o w d y
e. Big endian
f 00 42 h o w d y
5. Data protection and correction
a. Data needs to be accurate
b. Early primary memories had failure problems.
c. Data being transfered can be corrupted.
d. Hardware (secondary) can fail.
6. Detection only
a. Parity
(1) even/odd
(2) detects one bad bit in byte
(3) requires one extra bit of storage
(4) memory, data transfer, secondary storage
(5) data transfers
b. CRC - cyclic redundancy check
(1) product of bits
(2) detects one or more bad bits in bit stream
(3) requires ~ 10% additional storage
(4) data transfers
7. Correction
a. Hamming code
(1) Detects error in one or more bits.
(2) Recovers single bit errors.
(3) Can be calculated effeciently at the electronic level.
(4) Memory in Suns, mainframes, & other high end units
8. Hamming code function and cost
a. Graphic example - 4 bit
b. Cross product for larger units
c. Requires high overhead for small data units.
(Table from book)
(a) data error total %
(b) 8 4 12 50
(c) 16 5 21 31
(d) 32 6 38 19
(e) 64 7 71 11
(f) 128 8 136 6
9. Issues of memory design
a. Speed vs quantity
i. CPUs tend to be faster than memory.
ii. CPUs can address large ranges of primary memory
b. Costs
i. High speed primary memory is very expensive
ii. Moderate speed (5-10% of cpu) primary memory is very cheap
10. Consequences of memory design issues.
a. Result - most systems use a combination of primary memory types.
i. A small number of registers directly linked to the instruction
design, very expensive and fast.
ii. A large quantity of moderate speed main memory, minimum required
but quantity varies even on systems of the same design.
iii. A cache using a moderate (64K) quantity of high speed memory for
critical data.