0% found this document useful (0 votes)
29 views16 pages

Hid 06 Memor

Uploaded by

Dgl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views16 pages

Hid 06 Memor

Uploaded by

Dgl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

Memory

Memory Basics
 Memory is the workspace for the computer’s
processor. It is a temporary storage area where
the programs and data being operated on by the
processor must reside.
 Memory storage is considered temporary
because the data and programs remain there
only as long as the computer has electrical
power or is not reset.
 Before being shut down or reset, any data that
has been changed should be saved to a more
permanent storage device (usually a hard disk)
so it can be reloaded into memory in the future.
RAM
 Memory often is called RAM, for random access
memory.
 you can randomly (as opposed to sequentially) access
any location in memory.
 This designation is somewhat misleading and often
misinterpreted.
 Read-only memory (ROM), for example, is also
randomly accessible, yet is usually differentiated
from the system RAM because it maintains data
without power and can’t normally be written to. Disk
memory is also randomly accessible, but we don’t
consider that RAM either.
Dynamic RAM and Static RAM
 RAM can be made of DRAM or SRAM chips.
 One of the characteristics of DRAM chips is that they store
data dynamically, which really has two meanings.
 One meaning is that the information can be written to RAM
repeatedly at any time. The other has to do with the fact that
DRAM requires the data to be refreshed (essentially
rewritten) every 15ms (milliseconds) or so.
 A type of RAM called static RAM (SRAM) does not require
the periodic refreshing. An important characteristic of RAM in
general is that data is stored only as long as the memory has
electrical power.
Memory Analogy
 People new to computers often confuse main memory
(RAM) with disk storage because both have capacities that
are expressed in similar megabyte or gigabyte terms. The
best analogy to explain the relationship between memory
and disk storage is to think of an office with a desk and a file
cabinet.
 The file cabinet represents the system’s hard disk, where
both programs and data are stored for long-term
safekeeping. The desk represents the system’s main
memory, which allows the person working at the desk (acting
as the processor) direct access to any files placed on it.
 RAM chips are sometimes termed volatile storage because
when you turn off your computer or an electrical outage
occurs, whatever is stored in RAM is lost unless you saved it
to your hard drive.
Physical Memory
 Physically, the main memory in a system is a
collection of chips or modules containing chips
that are usually plugged into the motherboard.
 Three main types of physical memory are used
in modern PCs:
■ ROM. Read-only memory
■ DRAM. Dynamic random access memory
■ SRAM. Static RAM
ROM
 Read-only memory, or ROM, is a type of memory that can
permanently or semipermanently hold data. It is called read-
only because it is either impossible or difficult to write to.
 ROM also is often referred to as nonvolatile memory because
any data stored in ROM remains there, even if the power is
turned off.
 ROM is an ideal place to put the PC’s startup instructions.
 Note that ROM and RAM are not opposites, as some people
seem to believe.
 The main ROM BIOS is contained in a ROM chip on the
motherboard, but there are also adapter cards with ROMs on
them as well.
 Most systems today use a type of ROM called electrically
erasable programmable ROM (EEPROM), which is a form of
Flash memory.
DRAM
 Dynamic RAM (DRAM) is the type of memory chip used
for most of the main memory in a modern PC.
 The main advantages of DRAM are that it is very dense,
meaning you can pack a lot of bits into a very small chip,
and it is inexpensive, which makes purchasing large
amounts of memory affordable.
 The memory cells in a DRAM chip are tiny capacitors
that retain a charge to indicate a bit. If the capacitor is
charged, the cell is read to contain a 1; no charge
indicates a 0. The charge in the tiny capacitors is
constantly draining, which is why the memory must be
refreshed constantly.
 Refreshing the memory unfortunately takes processor
time away from other tasks because each refresh cycle
takes several CPU cycles to complete.
DRAM
 DRAM is used in PC systems because it is
inexpensive and the chips can be densely
packed, so a lot of memory capacity can fit in a
small space.
 Unfortunately, DRAM is also slow, typically
much slower than the processor. For this
reason, many types of DRAM architectures have
been developed to improve performance.
Cache Memory: SRAM
 SRAM stands for static RAM, which is so named because it
does not need the periodic refresh rates like DRAM. SRAM
is much faster than DRAM and fully capable of keeping
pace with modern processors.
 SRAM memory is available in access times of 2ns or less,
so it can keep pace with processors running 500MHz or
faster!
 The SRAM design calls for a cluster of six transistors for
each bit of storage. The use of transistors but no capacitors
means that refresh rates are not necessary because there
are no capacitors to lose their charges over time.
 So, why don’t we use SRAM for all system memory?
 Compared to DRAM, SRAM is much faster but also much lower in
density and much more expensive.
 The lower density means that SRAM chips are physically larger and
store fewer bits overall.
DRAM vs SRAM
 Basically, SRAM is up to 30 times larger physically and
up to 30 times more expensive than DRAM.
 The high cost and physical constraints have prevented
SRAM from being used as the main memory for PC
systems.
CPU Cache
 Even though SRAM is too expensive for PC use as main memory, PC
designers have found a way to use SRAM to dramatically improve PC
performance.
 SRAM memory, which can run fast enough to match the CPU, can be
used as a high speed memory, called cache memory.
 The cache runs at speeds close to or even equal to the processor and is
the memory from which the processor usually directly reads from and
writes to.
 During read operations, the data in the high-speed cache memory is re-
supplied from the lower-speed main memory or DRAM in advance.
 Up until recently, DRAM was limited to about 60ns (16MHz) in speed
which cannot cope up with the fast CPU speed.
 Cache effectiveness is expressed as a hit ratio. This is the ratio of cache
hits to total memory accesses.
 A hit occurs when the data the processor needs has been preloaded into
the cache from the main memory, meaning the processor can read it
from the cache. A cache miss is when the cache controller did not
anticipate the need for a specific address and the desired data was not
preloaded into the cache. In that case the processor must retrieve the
data from the slower main memory, instead of the faster cache.
L1 and L2 Cache
 To minimize the processor being forced to read data from the
slow main memory, two stages of cache usually exist in a
modern system, called Level 1 (L1) and Level 2 (L2).
 The L1 cache is also called integral or internal cache
because it is directly built into the processor and is actually a
part of the processor die (raw chip).
 Because of this, L1 cache always runs at the full speed of the
processor core and is the fastest cache in any system.
 L2 cache is also called external cache because it is external
to the processor chip.
 Originally, this meant it was installed on the motherboard, as
was the case with all 386, 486, and Pentium systems. In
those systems, the L2 cache runs at motherboard speed
because it is installed on the motherboard.
 In the interest of improved performance, later processor
designs from Intel and AMD have included the L2 cache as a
part of the processor.
On board, on chip & on die cache
 Cache speed is very important, so systems having
L2 cache on the motherboard were the slowest.
 Including L2 inside the processor made it faster,
and
 including it directly on the processor die (rather
than as chips external to the die) is the fastest yet.
 The new Itanium processor from Intel has three
levels of cache within the processor module for
even greater performance.
Review
1. Distinguish between SRAM and DRAM.
2. What are the functions of ROM?
3. What are the different types and levels of
CPU caches?

You might also like