Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
30 views

Computer Organization Architecture - Topic 5

The document discusses computer memory systems, including internal memory like registers, cache, and main memory, as well as external memory like magnetic disks and optical disks. It describes key features of memory systems like location, capacity, unit of transfer, access methods, performance, physical type, and physical characteristics. Semiconductor main memory types like RAM, ROM, PROM, EPROM, and EEPROM are also outlined. Cache memory purpose and techniques like direct mapping, associative mapping, and set associative mapping are summarized. Replacement algorithms and write policies for cache are briefly covered.

Uploaded by

asj233510377
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Computer Organization Architecture - Topic 5

The document discusses computer memory systems, including internal memory like registers, cache, and main memory, as well as external memory like magnetic disks and optical disks. It describes key features of memory systems like location, capacity, unit of transfer, access methods, performance, physical type, and physical characteristics. Semiconductor main memory types like RAM, ROM, PROM, EPROM, and EEPROM are also outlined. Cache memory purpose and techniques like direct mapping, associative mapping, and set associative mapping are summarized. Replacement algorithms and write policies for cache are briefly covered.

Uploaded by

asj233510377
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

TOPIC 5:

COMPUTER MEMORY SYSTEMS


TCS1063: COMPUTER ORGANIZATION & ARCHITECHTURE
INTRODUCTION
• Definition: Part of the computer where programs and data
are stored
• Parts:
Internal Memory External Memory
Data / instruction stored can be Data / instruction stored cannot
accessible easily by CPU be accessible easily by CPU
It’s a part of main component in a It’s a not an part of main
computer component in a computer
Ex: register, cache memory and Ex: magnetic disks, optical disks
main memory etc
Internal Memory External Memory
FEATURES OF MEMORY SYSTEMS
Location

Physical
Capacity
Characteristics

Unit Of
Physical Type
Transfer

Performance Access Method


Location
• Refers to whether memory is internal and external to the
computer

Capacity
• The characteristic of memory is its capacity

Unit of transfer
• Internal memory - equal to the number of data lines into
and out of the memory module
• External memory - data are transferred are referred to as
blocks
Access method
• Sequential: Start at the beginning and read through in order
• Direct: Access is by jumping to vicinity and sequential search
• Random: Individual addresses identify locations exactly
• Associative: Data is located by a comparison with contents of a portion
of the store

Performance
• Three performance parameter:
• Access time (latency): Time between presenting the address and
getting the valid data
• Memory Cycle time: Time be required for the memory to “recover”
before next access
• Transfer Rate: Data can be moved into or out of a memory unit
Physical type
• Semiconductor: RAM
• Magnetic: Disk & Tape
• Optical: CD & DVD
• Others: Bubble, Hologram

Physical characteristics
• Volatile memory: Information lost when electrical power is
switched off
• Non-volatile memory: Information remains without
deterioration until deliberately changed
SEMICONDUCTOR MAIN MEMORY
• Main memory referred to as core
• All semiconductor memory cells share certain properties:

Exhibit two stable states (binary 1 and 0)

Capable of being written to set the state

Capable of being read to sense the state


Random Access Memory (RAM)

Characteristic: It is possible to read


data from the memory and to write
new data into the memory easily and
rapidly
RAM slots for PC

RAMs for PC and Laptop

RAM slots for Laptop


• Require periodic charge refreshing to maintain
Dynamic data storage
RAM • Made with cells that store data as charge on
capacitors
(DRAM) • Simpler construction
• Less expensive
• Slower
• Main memory

• Hold its data as long as power is supplied to it


• Bits stored as on/off switches
Static • No refreshing needed
RAM • More complex construction
(SRAM) • More expensive
• Faster
• Cache
Read Only Memory (ROM)

Contains a permanent pattern of data


that cannot be changed
Nonvolatile  No power source is
required to maintain the bit values in
memory
Advantage: Data is permanently in main
memory
ROM slot in motherboard

ROMs for PC and Laptop


Programm-
able ROM
(PROM)

READ
ONLY Erasable
Flash
PROM
memory MEMORY (EPROM)
(ROM)

Electrically
EPROM
(EEPROM)
• Uses an electrical erasing
technology Programm-
able ROM
• Faster than EPROM (PROM)
• Non-volatile and be written
into only once
• Provides flexibility and
convenience

READ
ONLY Erasable
Flash
PROM
memory MEMORY (EPROM)
(ROM)

• A read-mostly memory that Electrically • Read and written electrically


can be written into at any EPROM • Can be altered multiple
time without erasing prior (EEPROM) times and hold its data
contents virtually indefinitely
CACHE MEMORY
• Cache memory is intended to give
memory speed approaching that of
the fastest memories available
• At the same time provide a large
memory size at less expensive types of
semiconductor memories
• The cache contains a copy of portion
in main memory
• When the processor attempts to read a word of memory, a
check is made to determine if the word is in the cache
• If YES, the word is delivered to the processor
• If NOT, a block of main memory is read into the cache and
then the word is delivered to the processor
• When a block of data is fetched into the cache, there will be
future references to that same memory location
Cache Size
• The size of the cache should be small enough
• The larger the cache, the lager the number of gates
involved in addressing the cache
• Effect of large cache  Resulting slower process
Mapping Function
• An algorithm is needed for mapping main memory
blocks into cache lines
• Purpose: For determining which main memory block
currently occupies a cache line
• The choice of the mapping function dictates how the
cache is organized.
• Three techniques:

Associative Set Associative


Direct Mapping
Mapping Mapping
The simplest technique

Map each block of main


Direct mapping
memory into one possible
cache line
Simple

Advantages:

Inexpensive to implement

A fixed cache location for


Disadvantage
any given block
Direct Mapping
Permitting each main
memory block to be loaded
into any line of the cache Interpret a memory
address as a tag and a word
field

Associative Mapping
Cache control logic
The tag field identifies a
block of main memory
Flexibility for block to
replace when a new block
is read into the cache

Replacement algorithms Maximize the hit ratio

A main memory block can


Advantage
load into any line of cache

The complex circuitry


Disadvantage required to examine all
cache lines in parallel
Associative Mapping
Set Associative Mapping
• Cache is divided into a number of sets, each set
contains a number of lines
• A given block maps to any line in a given set
• Total number of slot = Cache size
Slot size

• Main memory size = Number of block * Slot size

• Block size = Main memory size


Total number of blocks
1 kB = 1024 Byte
Example:
• Given the following information about cache memory system
that using set associative mapping method:
• Cache size is 1kB, Slot size is 128 words, Total number of
blocks is 16.
Words = Bytes
a) total number of slot?
b) main memory size?
c) block size?
Solution:
a) total number of slot?
Total number of slot = Cache size / Slot size
= (1*1024) / 128 = 8 slots
b) main memory size?
Main memory size = Number of block * Slot size
= 16 * 128 = 2,048 byte
c) block size?
Block size = Main memory size / Total number of blocks
= 2,048 / 16 = 128 byte
Replacement Algorithms

• Once the cache has been filled, when a new block is brought
into the cache, one of the existing blocks must be replaced
• 2 situations:
• Direct mapping: Only one possible line for any particular
block, and no choice is possible
• Associative and set associative mapping: A replacement
algorithm is needed
• Algorithms:

Least Recently Used (LRU) First In First Out (FIFO)


• Replace block that has been in • Replace block that has been in
cache longest with no reference cache longest
to it

Least Frequently Used (LFU)


• replace block which has had
Random
fewest hits
Write Policy
• The cache's write policy determines how it handles
writes to memory locations that are currently being held
in cache
• Must not overwrite a cache block unless main memory
is up to date
• If a word has been altered only in the cache, then the
corresponding memory word is invalid
• There are two techniques
All write operations The system only writes
are made to main the new information
memory to appropriate cache
Advantages: Simpler to line
Write Through
implement and When the cache line is

Write Back
Internal consistency needed for other
Disadvantage: memory address, the
Substantial memory changed data is
traffic and create a "written back" to
bottleneck - Slows system memory
down writes Better performance -
Saves time (time-
consuming)
EXTERNAL MEMORY
Magnetic
disk

Magnetic External
RAID
tape Memory

Optical
Memory
Magnetic disk
• A circular platter constructed of
nonmagnetic material (aluminum,
aluminum alloy or glass)
• Ex: Hard disk and Diskette

RAID
• A set of physical disk drives viewed by the
operating systems as a single logical drive
• Guarantees data recoverability in case of a
disk failure
Optical Memory
• CD: A non- erasable disk that can store more than 60
minutes of audio information on one side.
• Ex: CD-ROM, CD-R, CD-RW, DVD

Magnetic Tape
• The medium is flexible polyester tape coated with
magnetizable material
• Data on the tape are structured as a number of parallel
tracks
• The recording of data in this form is parallel recording

You might also like