0% found this document useful (0 votes)
26 views

ch01 2-Memory Hierarchy

1. Memory is used to store and retrieve information in a computer. It comes in different types based on access time, capacity, and cost, from fastest to slowest: registers, cache memory, main memory, and secondary storage. 2. Main memory, also called random access memory (RAM), is where active programs and data are run and stored. It is faster than secondary storage but slower than cache and registers. 3. Secondary storage, like hard disks, provides high capacity storage at a lower cost than main memory but has a much slower access time. It is used to store inactive programs and permanent data.

Uploaded by

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

ch01 2-Memory Hierarchy

1. Memory is used to store and retrieve information in a computer. It comes in different types based on access time, capacity, and cost, from fastest to slowest: registers, cache memory, main memory, and secondary storage. 2. Main memory, also called random access memory (RAM), is where active programs and data are run and stored. It is faster than secondary storage but slower than cache and registers. 3. Secondary storage, like hard disks, provides high capacity storage at a lower cost than main memory but has a much slower access time. It is used to store inactive programs and permanent data.

Uploaded by

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

Memory

A device that can save, store and retrieve


information.
The different memory elements are ordered
according to the following criteria:
1. access time,
2. capacity and
3. cost.
When you move away from CPU to secondary
memory, the access time and capacity of
memory increases

1
A computer has to store data and instructions. It uses
uses various types of memory to do this.
Speed of access
Registers fastest

Cache memory

Main memory

secondary storage
slowest

2
Registers
• The processor uses registers
• small internal memory very fast access
• used to temporarily store some information.
• The number of registers depends on the processor type.

• Example of registers:

• MAR(Memory Address Register)


• Memory Buffer Register (MBR)

• Program Counter (PC)


• Accumulator

• I/O Address Register (I/O AR)


• I/O Buffer Register (I/O BR)

• …… 3
• MAR: holds the address of memory where
CPU wants to read or write data. When
CPU wants to store some data in the
memory or reads the data from the
memory, it places the address of the
required memory location in the MAR.

4
• MBR: holds the contents of data or instruction read
from, or written in memory. The contents of instruction
placed in this register are transferred to the Instruction
Register, while the contents of data are transferred to
the accumulator or I/O register.
• In other words you can say that this register is used to
store data/instruction coming from the memory or going
to the memory.

5
I/O Address Register (I/O AR):
used to specify the address of a particular I/O device.
I/O Buffer Register:
used for exchanging data between the I/O module and the
processor.

Program Counter (PC)


used to store the address of the next instruction to be
fetched for execution. When the instruction is fetched, the
value of PC is incremented. Thus this register always
points or holds the address of next instruction to be
fetched.
6
Instruction Register (IR):
Once an instruction is fetched from main memory, it is
stored in the Instruction Register.
The control unit takes instruction from this register,
decodes and executes it by sending signals to the
appropriate component of computer to carry out the task.

7
Accumulator Register:
1. located inside the ALU,
2. used during arithmetic & logical operations of ALU. The control unit
stores data values fetched from main memory in the accumulator for
arithmetic or logical operation.
3. holds the initial data to be operated upon, the intermediate results, and
the final result of operation.
4. The final result is transferred to main memory through MBR.

8
Cache memory

• fast small memory.


• Used as a buffer between the CPU and main memory.
• Minimizes CPU access time to the main memory.

9
Central memory/ main
memory
• The main storage of information used by the CPU.
• access time is much greater than to registers and
cache memory.
• Any program to run must be loaded in main memory.
• The CPU looks for instructions one after the other
to run sequentially.
• The capacity and speed of the main memory are key
elements in the power of a computer.

• 2 types: RAM and ROM.

10
RAM (Random Access Memory)

• Volatil memory loses its contents when the power is


turned off.
It contains:
• the program for a specific treatment,
• the data it requires and the results it generates

11
RAM (Random Access Memory)

2 technologies Static and Dynamic RAM:


1. SRAM (Static RAM) and
2. DRAM (Dynamic RAM) holds data but in a different ways.

• DRAM requires the data to be refreshed periodically in order to


retain the data.
• SRAM does not need to be refreshed as the transistors inside
would continue to hold the data as long as the is power.

SRAM faster than DRAM.

12
ROM (Read Only Memory)

• ROM is "built-in" computer memory containing data that normally can


only be read, not written to. ROM contains the programming that allows
your computer to be "booted up" or regenerated each time you turn it
on. Unlike a computer's random access memory (RAM), the data in ROM
is not lost when the computer power is turned off. The ROM is sustained
by a small long-life battery in your computer.
• If you ever do the hardware setup procedure with your computer, you
effectively will be writing to ROM.

13
ROM (Read Only Memory)
• PROM - (programmable read-only memory) is a memory chip on
which data can be written only once. Once a program has been
written onto a PROM, it remains there forever.

• The difference between a PROM and a ROM is that a PROM is


manufactured as blank memory, whereas a ROM is programmed
during the manufacturing process.

• To write data onto a PROM chip, you need a special device called
a PROM programmer or burner.

14
EPROM, EEPROM
• EPROM - (Erasable Programmable ROM) is a
special type of PROM that can be erased by
exposing it to ultraviolet light. Once it is
erased, it can be re-programmed.

• An EEPROM(Electrically Erasable
Programmable ROM ) is similar to a PROM, but
requires only Electricity to be Erased.
15
Secondary / mass memory
• high capacity and relatively low cost.
• They serve as permanent storage elements and
use it to magnetic media (disks) and optical
media (CD-ROM, CD-RW, DVD-ROM ...)

16

You might also like