You are on page 1of 16

Computer Memory

COE125
Computer Memory

Historically, the limiting factor in a


computer’s performance has been
memory access time
 Memory speed has been slow compared to
the speed of the processor
 A process could be bottlenecked by the
memory system’s inability to “keep up” with
the processor
Terminology (1)

 Capacity - the amount of information that can be


contained in a memory unit -- usually in terms of words
or bytes

 Word - the natural unit of organization in the memory,


typically the number of bits used to represent a
number

 Addressable unit - the fundamental data element size


that can be addressed in the memory -- typically either
the word size or individual bytes
Terminology (2)

 Unit of transfer - The number of data


elements transferred at a time – usually bits in
main memory and blocks in secondary
memory

 Transfer rate - Rate at which data is


transferred to/from the memory device
Terminology (3)

 Access time:
 For RAM, the time to address the unit and perform
the transfer
 For non-random access memory (e.g. disks), the
time to position the R/W head over the desired
location
 Memory cycle time - Access time plus any
other time required before a second access
can be started
Memory Access Techniques (1)

 Random access:
 Each location has a unique physical address
 Locations can be accessed in any order and
all access times are the same
 What we term “RAM” is more aptly called
read/write memory since this access
technique also applies to ROMs as well
 Example: main memory
Memory Access Techniques (2)

 Sequential access:
 Data does not have a unique address
 Must read all data items in sequence until
the desired item is found
 Access times are highly variable
 Example: tape drive units
Memory Access Techniques (3)

 Direct access:
 Data items have unique addresses
 Access is done using a combination of
moving to a general memory “area”
 followed by a sequential access to reach the
desired data item
 Example: disk drives
Memory Access Techniques (4)

 Associative access:
 A variation of the random access technique
 Data items are accessed based on their contents
rather than their actual location
 Search all data items in parallel for a match to a
given search pattern
 All memory locations searched in parallel without
regard to the size of the memory
 Extremely fast for large memory sizes
 Cost per bit is 5-10 times that of a “normal” RAM
cell
 Example: some cache memory units
Memory Hierarchy (1)

 Major design objective of any memory


system:
 To provide adequate storage capacity at …
 An acceptable level of performance…
 At a reasonable cost
The Memory Hierarchy
Memory Hierarchy (2)

 Components of the memory hierarchy:


 Registers internal to the CPU for temporary
data storage (small in number but very fast)
 External storage for data and programs
(relatively large and fast)
 External permanent storage (much larger
and much slower)
Memory Hierarchy (3)

 Characteristics of the memory hierarchy:


 Consists of distinct “levels” of memory
components
 Each level characterized by its size, access
time, and cost per bit
 Each increasing level in the hierarchy
consists of modules of larger capacity,
slower access time, and lower cost/bit
Memory Hierarchy (4)

 Goal of the memory hierarchy:


 Try to match the processor speed with the
rate of information transfer by searching
data first from the smallest (but fastest)
element in the hierarchy and going down to
the larger (but slower) elements until a
particular data item is found.
Memory Hierarchy (5)

 The memory hierarchy works because of


locality of reference
 Memory references made by the processor, for both
instructions and data, tend to cluster together
 Instruction loops, subroutines
 Data arrays, tables

 Keep these clusters in high speed memory to


reduce the average delay in accessing data
 Over time, the clusters being referenced will change
 memory management must deal with this
End of Presentation

You might also like