Unit4 COA
Unit4 COA
Memory Unit
Unit: 4
1
11/22/2023 AMIT YADAV Computer Organization and Architecture
Evaluation scheme
Other applications
computer system
CO 2 Analyze the design of arithmetic & logic unit and understand the K1, K4
• These relate to the skills, knowledge, and behavior that students acquire
through the programmed.
PO PO PO
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 10 11 12
CO1 3 2 1 1 1 1 1 - 1 1 1 2
CO2 2 2 2 2 1 1 - 1 1 1 1 2
CO3 3 2 2 1 2 2 1 1 2 2 1 2
CO4 3 2 2 2 2 1 1 - 1 1 1 2
CO5 2 2 2 1 2 - 1 - 1 2 2 2
Average 2.6 2 1.8 1.4 1.6 1 0.8 0.4 1.2 1.4 1.2 2
Memory:
➢Basic concept and hierarchy
➢semiconductor RAM memories
➢2D & 2 1/2D memory organization
➢ ROM memories
➢Cache memories: concept and design issues & performance
address mapping and replacement
➢Auxiliary memories: magnetic disk, magnetic tape and
optical disks
➢Virtual memory: concept implementation
.
11/22/2023 11
AMIT YADAV Computer Organization and Architecture
Course Objective
11/22/2023 12
AMIT YADAV Computer Organization and Architecture
Course Outcome
11/22/2023 13
AMIT YADAV Computer Organization and Architecture
CO-PO Mapping
CO.K PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
KCS-
302.4 3 2 2 2 2 1 1 1 1 1 1 2
11/22/2023 14
AMIT YADAV Computer Organization and Architecture
CO- PSO Mapping
11/22/2023 15
AMIT YADAV Computer Organization and Architecture
Memory
11/22/2023 16
AMIT YADAV Computer Organization and Architecture
Prerequisite and Recap
11/22/2023 17
AMIT YADAV Computer Organization and Architecture
Memory
•The k-address lines specify the word chosen. When there are k
address lines, 2k memory word can be accessed.
11/22/2023 18
AMIT YADAV Computer Organization and Architecture
Classification of Memory
11/22/2023 19
AMIT YADAV Computer Organization and Architecture
Memory Hierarchy
11/22/2023 20
AMIT YADAV Computer Organization and Architecture
Memory Hierarchy
11/22/2023 21
AMIT YADAV Computer Organization and Architecture
Memory Hierarchy
11/22/2023 22
AMIT YADAV Computer Organization and Architecture
Semiconductor RAM
•RAM is used to Read and Write data into it which is accessed by CPU
randomly. RAM is volatile in nature.
• RAM is used to store the data that is currently processed by the CPU.
11/22/2023 23
AMIT YADAV Computer Organization and Architecture
Semiconductor RAM
11/22/2023 24
AMIT YADAV Computer Organization and Architecture
SRAM
11/22/2023 25
AMIT YADAV Computer Organization and Architecture
DRAM
11/22/2023 26
AMIT YADAV Computer Organization and Architecture
DRAM
11/22/2023 27
AMIT YADAV Computer Organization and Architecture
SRAM Vs. DRAM
11/22/2023 28
AMIT YADAV Computer Organization and Architecture
Organization of Memory Chips
11/22/2023 29
AMIT YADAV Computer Organization and Architecture
2D and 2.5D Memory organization
2D Memory organization
In 2D organization memory is divides in the form of rows and
columns. Each row contains a word now in this memory organization
there is a decoder.
One of the output line will select the row which address is contained
in the MAR.
The word which is represented by the row that will get selected and
either read or write through the data lines.
11/22/2023 30
AMIT YADAV Computer Organization and Architecture
2D and 2.5D Memory organization
2D Memory organization
11/22/2023 31
AMIT YADAV Computer Organization and Architecture
2D and 2.5D Memory organization
2.5 D Memory organization
In 2.5D Organization the scenario is the same but we have two
different decoders one is column decoder and another is row
decoder.
Column decoder used to select the column and row decoder is used
to select the row. Address from the MAR will go in decoders’ input.
Decoders will select the respective cell. Through the bit outline, the
data from that location will be read or through the bit in line data
will be written at that memory location.
11/22/2023 32
AMIT YADAV Computer Organization and Architecture
2D and 2.5D Memory organization
2.5D Memory organization
11/22/2023 33
AMIT YADAV Computer Organization and Architecture
2D and 2.5D Memory organization
Read and Write Operations
•If the select line is in Read mode then the Word/bit which is
represented by the MAR that will be coming out to the data lines
and get read.
•If the select line is in write mode then the data from memory data
register (MDR) will go to the respective cell which is addressed by
the memory address register (MAR).
•With the help of the select line the data will get selected where the
read and write operations will take place.
•
11/22/2023 34
AMIT YADAV Computer Organization and Architecture
2D and 2.5D Memory organization
Comparison between 2D & 2.5D Organizations
•2D Organization requires more no. of Gates while 2.5D requires less
no. of Gates.
11/22/2023 35
AMIT YADAV Computer Organization and Architecture
ROM Memory
11/22/2023 36
AMIT YADAV Computer Organization and Architecture
ROM Memory
•Internal Structure of ROM:
•The internal structure comprises two basic components: decoder
and OR gates.
•All the OR gates present in the ROM will have outputs of the
decoder as their output.
11/22/2023 37
AMIT YADAV Computer Organization and Architecture
ROM Memory
11/22/2023 38
AMIT YADAV Computer Organization and Architecture
RAM Vs.ROM
11/22/2023 39
AMIT YADAV Computer Organization and Architecture
Cache Memory
•Cache Memory is a special very high-speed and small memory. It is used
to speed up and synchronizing with high-speed CPU.
•Cache memory acts as a buffer between RAM and the CPU. It holds
frequently requested data and instructions so that they are immediately
available to the CPU when needed.
•Cache memory is used to reduce the average time to access data from the
Main memory.
•The cache stores copies of the data from frequently used main memory
locations.
•There are various different independent caches in a CPU, which store
instructions and data.
11/22/2023 40
AMIT YADAV Computer Organization and Architecture
Cache Memory
•For a cache miss, the cache allocates a new entry and copies in data
from main memory, then the request is fulfilled from the contents of
the cache.
Hit ratio = hit / (hit + miss)
11/22/2023 41
AMIT YADAV Computer Organization and Architecture
Cache Memory
Types of Cache
There are two types of cache memory-
•Primary Cache
A primary cache is always located on the processor chip. This cache is
small and its access time is comparable to that of processor registers.
It is referred to as the level 1 (L1) cache.
•Secondary Cache
Secondary cache is placed between the primary cache and the rest of
the memory. It is referred to as the level 2 (L2) cache. Often, the Level
2 cache is also housed on the processor chip.
11/22/2023 42
AMIT YADAV Computer Organization and Architecture
Cache Memory
Locality of reference
Since size of cache memory is less as compared to main
memory. So to check which part of main memory should be given
priority and loaded in cache is decided based on locality of reference.
11/22/2023 43
AMIT YADAV Computer Organization and Architecture
Cache Memory Mapping
Cache Mapping:
There are three different types of mapping used for the purpose
of cache memory which are as follows:
Associative mapping
Direct mapping
Set-Associative mapping.
11/22/2023 44
AMIT YADAV Computer Organization and Architecture
Cache Memory Mapping
11/22/2023 45
AMIT YADAV Computer Organization and Architecture
Cache Memory Mapping
11/22/2023 46
AMIT YADAV Computer Organization and Architecture
Cache Memory Mapping
11/22/2023 47
AMIT YADAV Computer Organization and Architecture
Virtual Memory
11/22/2023 48
AMIT YADAV Computer Organization and Architecture
Virtual Memory
11/22/2023 49
AMIT YADAV Computer Organization and Architecture
Virtual Memory
11/22/2023 50
AMIT YADAV Computer Organization and Architecture
Virtual Memory
11/22/2023 51
AMIT YADAV Computer Organization and Architecture
Virtual Memory
11/22/2023 52
AMIT YADAV Computer Organization and Architecture
Page Replacement Algorithm
Example
A system uses 3 page frames for storing process pages in main memory. It
uses the FIFO page replacement policy. Assume that all the page frames
are initially empty. What is the total number of page faults, hit ratio and
miss ratio and page reference string given below-
4 , 7, 6, 1, 7, 6, 1, 2, 7, 2
11/22/2023 54
AMIT YADAV Computer Organization and Architecture
FIFO Replacement Algorithm
Solution-
Total number of references = 10
11/22/2023 55
AMIT YADAV Computer Organization and Architecture
LIFO Page Replacement Algorithm
It replaces the newest page that arrived at last in the main memory.
Example
A system uses 3 page frames for storing process pages in main memory. It
uses the LIFO page replacement policy. Assume that all the page frames
are initially empty. What is the total number of page faults, hit ratio and
miss ratio and page reference string given below-
4 , 7, 6, 1, 7, 6, 1, 2, 7, 2
11/22/2023 56
AMIT YADAV Computer Organization and Architecture
LIFO Page Replacement Algorithm
Solution-
Total number of references = 10
11/22/2023 57
AMIT YADAV Computer Organization and Architecture
Optimal Replacement Algorithm
Example
A system uses 3 page frames for storing process pages in main memory. It
uses the Optimal page replacement policy. Assume that all the page
frames are initially empty. What is the total number of page faults, hit
ratio and miss ratio and page reference string given below-
4 , 7, 6, 1, 7, 6, 1, 2, 7, 2
11/22/2023 58
AMIT YADAV Computer Organization and Architecture
Optimal Page Replacement Algorithm
Solution-
Total number of references = 10
11/22/2023 59
AMIT YADAV Computer Organization and Architecture
Auxiliary Memories
Auxiliary memory (also referred to as secondary storage) is the non-
volatile memory lowest-cost, highest-capacity, and slowest-access
storage in a computer system.
It is where programs and data kept for long-term storage or when not in
immediate use. It is not directly accessible by the CPU. For example:
Magnetic disks and tapes, Optical Disk.
Hard disk: A hard disk consists of one or more circular disks called platters
which are mounted on a common spindle. Each surface of a platter is coated
with a magnetic material.
11/22/2023 61
AMIT YADAV Computer Organization and Architecture
Auxiliary Memories
DVD:
It stands for Digital Versatile Disk or Digital Video Disk. It looks just like a CD
and use a similar technology as that of the CDs but allows tracks to be
spaced closely enough to store data that is more than six times the CD’s
capacity.
While CDs or DVDs use red laser beam, the blue ray disk uses a blue laser to
read/write data on a disk.
11/22/2023 62
AMIT YADAV Computer Organization and Architecture
Auxiliary Memories
DVD CD
Hard Disk
11/22/2023 63
AMIT YADAV Computer Organization and Architecture
Faculty Video Links, You tube Courses Details
11/22/2023 64
AMIT YADAV Computer Organization and Architecture
Daily Quiz
65
11/22/2023 AMIT YADAV Computer Organization and Architecture
Weekly Assignment
11/22/2023 66
AMIT YADAV Computer Organization and Architecture
MCQ
1 Which of the following is the fastest means of memory access for CPU?
a) Registers b) Cache c) Main memory d) Virtual Memory
2. Size of the ____memory mainly depends on the size of the address bus.
a) Main b) Virtual c) Secondary d) Cache
3. What is the location of the internal registers of CPU?
a) Internal b) On-chip c) External d) Motherboard
4. MAR stands for ___________
5. Which of the following is non-volatile storage?
a) Backup b) Secondary c) Primary d) Cache
6. Which of the following is used in main memory?
a) SRAM b) DRAM c) PRAM d) DDR
7. RAID stands for __________
Solution 1 b. 2a. 3 b. 4 Memory address register. 5 b 6 b
7 Redundant array of independent disks
11/22/2023 67
AMIT YADAV Computer Organization and Architecture
Old Question Papers
69
11/22/2023 AMIT YADAV Computer Organization and Architecture
Expected Questions for University Exam
70
11/22/2023 AMIT YADAV Computer Organization and Architecture
Summary
71
11/22/2023 AMIT YADAV Computer Organization and Architecture