04 Memory Organization
04 Memory Organization
04 Memory Organization
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 1
Memory Hierarchy
2
Main Memory
¾Only programs and data currently needed by the
processor
Auxiliary Memory
¾Devices that provide backup storage
¾System programs, large data files etc
¾E.g. magnetic disks and tapes
Cache
¾Increases the speed of processing
¾Rapid rate and small size
¾Compensates speed difference between main
memory and processor
¾Segments of programs and data currently in use
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 2
Memory Hierarchy
3
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 3
Memory Hierarchy
4
I/O processor
Magnetic disks
Cache Memory
CPU
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 4
Hierarchy List
5
Registers
L1 Cache
L2 Cache
Main memory
Disk cache
Disk
Optical
Tape
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 5
Main Memory
6
Central storage unit
Large and fast memory to store programs and data during
the computer operation
RAM
¾Random access memory
¾Volatile
¾Stores programs and data that are subject to
change
¾Read/write memory
ROM
¾Read only memory
¾Non-volatile
¾Stores tables of constant data that do not change
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 6
Main Memory
7
Bootstrap loader
¾Startup program
¾Stored in ROM
¾Its function is to load the operating system
ROM and RAM chips are available in variety of sizes
¾e.g. 128x8
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 7
RAM chip
8
7-bit Address
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 8
Memory Connection to CPU
9
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 9
Memory Connection to CPU
10
CPU
Decoder 128x8
3 2 1 0 RAM 1
128x8
RAM 2
128x8
RAM 3
128x8
RAM 4
512x8
Memory Organization Computer Organization and Assembly Language – NUCES
ROM Hina Anwar – slide 10
Auxiliary Memory
11
Characteristics
¾Access mode
¾Access time
¾Transfer rate
¾Capacity
¾Cost
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 11
Access Mode
12
Sequential
¾Start at the beginning and read through in order
¾Access time depends on location of data and
previous location
¾e.g. tape
Direct
¾Individual blocks have unique address
¾Access is by jumping to vicinity plus sequential
search
¾Access time depends on location and previous
location
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 12
¾e.g. disk
Access Mode
13
Random
¾Individual addresses identify locations exactly
¾Access time is independent of location or previous
access
¾e.g. RAM
Associative
¾Data is located by a comparison with contents of a
portion of the store
¾Access time is independent of location or previous
access
¾e.g. cache
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 13
Access Time
14
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 14
Transfer Rate
15
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 15
Locality of Reference
16
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 16
Cache
17
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 17
Cache operation ‐ overview
18
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 18
Cache Performance
19
Hit ratio
¾When CPU refers to memory and finds the word in
cache, it is said to produce a hit
¾If not found, it is called a miss
¾Hit Ratio = Number of hits / Total CPU references
to memory
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 19
References
20
Memory Organization Computer Organization and Assembly Language – NUCES Hina Anwar – slide 20