Computer Organization and Architecture: Chapter Five
Computer Organization and Architecture: Chapter Five
Computer Organization and Architecture: Chapter Five
Architecture
Chapter five
Memory Organization
12/17/2020 1
Memory Unit
• In this chapter:
– Memory Hierarchy
– Main Memory
– External Memory
– Cache Memory
12/17/2020 2
Introduction
12/17/2020 3
Characteristics of Memory Systems
Location
Capacity
Unit of transfer
Access method
Performance
Physical type
Physical characteristics
Location:
Refers to whether it is internal or external to computer
Internal:
main memory, cache, registers
Directly accessible by CPU
External – magnetic disks, tapes, optical disks
12/17/2020 4
Accessible by CPU through I/O module
Capacity:
Word size: Capacity is expressed in terms of words or bytes.
• Number of words: Common word lengths are 8, 16, 32 bits etc.
Unit of transfer:
The number of bits read out of or written into memory at a time
Internal: For internal memory, the unit of transfer is equal to
the number of data lines into and out of the memory module.
External: data are often transferred in much larger units than a
12/17/2020 5
Method of access:
1. Sequential access:
12/17/2020 9
The Memory Hierarchy
The design constraints on a computer’s memory can
be summed up by three questions:
− How much?
− How fast?
− How expensive?
A variety of technologies are used to implement
memory systems, and across this spectrum of
technologies, the following relationships hold:
− Faster access time, greater cost per bit
− Greater capacity, smaller cost per bit
12/17/2020
− Greater capacity, slower access time 10
The memory unit that communicates with directly with CPU is
called main memory.
• Not enough storage space.
• Contains programs and data currently needed are stored here
Devices that provide backup storage are called auxiliary memory.
• Most common are magnetic disks and tape drives.
• Used to store system programs, large data files, backup data
• Not urgently needed data are stored here.
Total memory capacity of a computer can be visualized as a
hierarchy of components.
12/17/2020 11
12/17/2020 12
The way out of this dilemma is not to rely on a
single memory component or technology, but to
employ a memory hierarchy. As one goes down
the hierarchy, the following occur:
cost per bit Decrease
Increasing capacity
Increasing access time
Decreasing frequency of access of the
memory by the processor
12/17/2020 13
NB:
• At bottom of hierarchy you can find slow magnetic
tapes(removable files)
• at middle you can find magnetic disks (backup storage)
• then main memory which can communicate with CPU and
auxiliary memories.
• At top of pyramid resides the cache memory. Used to increase
speed of processing. Compensate of speed difference between
CPU and main memory.
• Usually in cache segments of programs and data frequently
accessed are stored to benefit from high speed access by CPU not
found in main memory.
12/17/2020 14
Main Memory
• The main memory' is the central storage unit in a computer
system.
• It is a relatively large and fast memory used to store
programs and data during the computer operation.
• The principal technology used for the main memory is
based on semiconductor integrated circuits .
• Integrated circuit RAM chips are available in two possible
operating modes, static (SRAM)and dynamic(DRAM).
• The static RAM consists essentially of internal flip-flops
that store the binary information. The stored information
remains valid as long as power is applied to the unit.
• The static RAM is easier to use and has shorter read and
write cycles.
12/17/2020 15
Cont…
• The dynamic RAM stores the binary information in the form
of electric charges that are applied to capacitors.
• The stored charge on the capacitors tends to discharge with
time , capacitor must be periodically recharged and which is
also called refreshing memory.
• The dynamic RAM offers reduced power consumption and
larger storage capacity in a single memory chip.
• RAM is volatile, its contents are destroyed when power is off.
• RAM is used for storing the bulk of the programs and data that
are subject to change.
12/17/2020 16
SRAM vs DRAM
Both volatile
Power needed to preserve data
Static RAM
Uses flip flop to store information
Needs more space
Faster, digital device
Expensive, big in size
Don't require refreshing circuit
Used in cache memory
Dynamic RAM
Uses capacitor to store information
More dense i.e. more cells can be accommodated per unit area
Slower, analog device
Less expensive, small in size
Needs refreshing circuit
Used in main memory, larger memory units
12/17/2020 17
Read-Only Memory (ROM)
• ROM is used for storing programs that are permanently
resident in the computer
• Among other things, the ROM portion of main memory is
needed for storing an initial program called a bootstrap loader.
• The bootstrap loader((BIOS) is a program whose function is to
start the computer software operating when power is turned on.
• Nonvolatile: The contents of ROM remain unchanged after
power is turned off and on again.
12/17/2020 18
Types of ROM
i. Read-only (ROM)
ii. Programmable (PROM)
iii. Erasable Programmable (EPROM)
iv. Electrically Erasable Programmable (EEPROM)
I. PROM
Can be written once
Process performed electrically
Needs special equipment or circuitry to program
Once the programs are written, it cannot be changed or erased
12/17/2020 19
II. EPROM
Can be written several times
12/17/2020 21
Cache Memory
A cache memory is a small capacity memory , very fast memory that
retains copies of recently used information from main memory.
12/17/2020 22
Cache Operation
• CPU requests contents of memory location
• If present
– get from cache (fast)
• If not present
– read required block from main memory to cache
– deliver data to CPU
12/17/2020 23