Computer Memory: Rovelito I. Navarra
Computer Memory: Rovelito I. Navarra
Computer Memory: Rovelito I. Navarra
Rovelito I. Navarra
Dec. 10-2013
1
Introduction
• Hardware refers to the physical equipment used for the
input, processing, output and storage activities of a
computer system.
2
How the CPU Works
3
How the CPU Works (Continued)
• Binary form: The form in which data and instructions can be
read by the CPU – only 0s and 1s.
• Clock speed: The preset speed of the computer clock that times
all chip activities, measured in megahertz and gigahertz.
• Word length: The number of bits (0s and 1s) that can be
processed by the CPU at any one time.
• Bus width: The size of the physical paths down which the data
and instructions travel as electrical impulses on a computer
chip.
4
What is Memory
Main memory consists of a number of
storage locations, each of which is
identified by a unique address
The ability of the CPU to identify
each location is known as its
addressability
Each location stores a word i.e. the
number of bits that can be processed
by the CPU in a single operation.
Word length may be typically 16, 24,
32 or as many as 64 bits.
5
Computer Memory
6
Primary Storage
• Primary storage or main memory stores three types of
information for very brief periods of time:
– Data to be processed by the CPU;
– Instructions for the CPU as to how to process the data;
– Operating system programs that manage various
aspects of the computer’s operation.
• Primary storage takes place in chips mounted on the
computer’s main circuit board, called the motherboard.
• Four main types of primary storage: register, random
access memory (RAM), cache memory and read-only
memory (ROM).
7
Types of Primary Storage
• Registers: registers are part of the CPU with the least
capacity, storing extremely limited amounts of
instructions and data only immediately before and
after processing.
9
Random Access Memory (RAM)
It is direct access as it can be both written to or read from in any order
Its purpose is to temporarily hold programs and data for processing.
In modern computers it also holds the operating system
10
Types of RAM
1. Dynamic Random Access Memory (DRAM)
• Contents are constantly refreshed 1000 times per second
• Access time 60 – 70 nanoseconds
11
Types of RAM
4. Static Random Access Memory (SRAM)
• Doesn’t need refreshing
• Retains contents as long as power applied to the chip
• Access time around 10 nanoseconds
• Used for cache memory
• Also for date and time settings as powered by small battery
12
Read only memory (ROM)
Data can be read by the CPU in any order so ROM is also direct access
Stores a program called the bootstrap loader that helps start up the
computer
13
Types of ROM
1. Programmable Read Only Memory (PROM)
• Empty of data when manufactured
• May be permanently programmed by the user
14
Types of ROM
3. Electrically Erasable Programmable Read Only Memory (EEPROM)
• Reprogrammed electrically without using ultraviolet light
• Must be removed from the computer and placed in a special machine to do this
• Access times between 45 and 200 nanoseconds
4. Flash ROM
• Similar to EEPROM
• However, can be reprogrammed while still in the computer
• Easier to upgrade programs stored in Flash ROM
• Used to store programs in devices e.g. modems
• Access time is around 45 – 90 nanoseconds
5. ROM cartridges
• Commonly used in games machines
• Prevents software from being easily copied
15
Caches
• The rate of data fetching by the CPU from the main memory is
about 100 times faster than from secondary memory. But
there is also a mismatch between main memory and CPU.
CPU can process the data 10 times faster than the main
memory. Which limits the performance of the CPU due to
mismatch in CPU and main memory speed. So Cache memory
act as a buffer b/w main memory and CPU.
• Cache: A smaller, high speed storage device used to increase
the speed of processing by making current programs and data
available to the CPU at a rapid rate. The basic characteristic of
cache memory is its fast access time.
16
Cache memory
17
The operation of cache memory
Cache
Main
Memory CPU
Memory
(SRAM)
(DRAM)
= Bus connections 18
Virtual memory
19
Secondary Storage
20
Secondary storage
Magnetic tape
21
Secondary Storage (Continued)
• Hard disk: A form of secondary storage that stores data on
platters divided into concentric tracks and sectors, which can be
read by a read/write head that pivots across the rotating disks.
24
An Example Memory Hierarchy
Smaller, L0:
faster, registers CPU registers hold words retrieved from
and L1 cache.
costlier L1: on-chip L1
(per byte) cache (SRAM) L1 cache holds cache lines retrieved
storage from the L2 cache memory.
devices L2: off-chip L2
cache (SRAM) L2 cache holds cache lines retrieved
from main memory.
26