Computer Organization and Architecture: Chapter Five

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Computer Organization and

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

• Memory is an essential component of computers system

• The memory is the place where the computer holds current


programs and data that are in use.
• No one technology is optimal in satisfying the memory
requirements for a computer system.
• It exhibits widest range of type, technology, organization,
performance and cost.

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

word, and these are referred to as blocks

12/17/2020 5
Method of access:
1. Sequential access:

- Access to records is made in a specific linear sequence


- Access time :depends on position of records (unit of
data) and previous location.
access time is variablee.g. Tape
2. Direct access:
- Individual blocks have unique address
- Access by jumping to neighbourhood plus sequential
search
- Access time – Access time depends on location of data
within "block" and previous location
e.g. Disk
12/17/2020 6
3. Random access:

- Individual addresses identify locations exactly

- Each location – its own addressing mechanism

- Access time – Access time is consistent across all locations and is


independent of previous access e.g. RAM
4. Associative

- Associative: similar to random access

- Making a comparison of desired bit locations within a word for a


specified match

- a word is retrieved based on a portion of its contents rather than its


address

- retrieval time is constant E.g. Cache memories


7
Performance:

Access time (latency)


Time between "requesting" data and getting it
- time between presenting the address and getting the
valid data
Memory cycle time
- Applies to random-access memory
- Time may be required for the memory to “recover”
before next access
- Represents access time plus any additional time
required before a second access can commence.
Transfer rate: rate at which data can be moved into/out
of a memory unit
12/17/2020 8
Physical type
 Semiconductor (RAM)
 Magnetic(Disk, tape)
 Optical(CD, DVD)
Physical Characteristics
− Volatility
− Erasable / read-only
− Power consumption

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

• Before writing, all content must be erased with ultraviolet light


• reprogrammed using a special programming facility.
Very slow to erase
More expensive than PROM
III. EEPROM
Can be written at any time
• With either programmer equipment or by processor (electrically)
• Only desired bytes are updated
Slow write times (10 ms compared to 100-200 ns for read)
Can be updated in-place, using regular bus control, address, and data
lines
12/17/2020 20
More expensive than EPROM
Auxiliary Memory /External Memory
 Common used secondary memory and their types:
 Magnetic disks
Optical and
 Magnetic tapes.

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.

 Then the average memory access time can be reduced dramatically


 Placed between processor and main memory
 Cache Memory Has less access time than main memory

12/17/2020 22
Cache Operation
• CPU requests contents of memory location

• Check cache for this data

• If present
– get from cache (fast)

• If not present
– read required block from main memory to cache
– deliver data to CPU

• Tags – identify which block of main memory is in each cache line

12/17/2020 23

You might also like