CM 303
CM 303
ANDHRA PRADESH
Name : U.Rajya Lakshmi
Designation : Lecturer
Branch : Computer Engg.,
Institute : Govt.Polytechnic for Women,
PALAMANER.
Year/Semester : III Semester
Subject : Computer Architecture
Subject Code : CM-303
Topic : Memory Organization
Duration : 50 Min
Sub Topic : paging scheme of Virtual Memory
Teaching aids : PPT,drawings
CM303.44 1
Do you Know
CM303.44 2
Recap of previous lesson
• Address mapping
• Translation of virtual addresses in to physical
addresses
• various mapping techniques
• Paging scheme
• Segmentation scheme
CM303.44 3
Objectives
CM303.44 4
Introduction
• In virtual memory system CPU generates virtual
addresses that refer instructions and data of a
program
CM303.44 6
Contd.,
Paging
• Groups of virtual memory are called as pages
CM303.44 7
Paging Contd.,
CM303.44 8
Contd.,
Page 0 Paging
Page 1
Page 2
Page 3
Page 4 Block 0
Page 5 Block 1
Page 6 Block 2
Page 7 Block 3
Address space Memory space
V=8K=213 M=4K=212
Fig.1 CM303.44 9
Paging Contd.,
CM303.44 10
Paging Contd.,
3 bits 10 bits
Fig.2
CM303.44 12
Paging
• Address mapping in paging scheme is the only
mapping from pages to blocks
CM303.44 13
Paging
• Block no. field denotes where the page is loaded
in to main memory
• Presence bit
• indicates whether the page is loaded in main
memory or not
• 0 means page is not available
• 1 means page is available
000 0
001 01 1
010 11 1
011 0
100 10 1
101 0
110 00 1
111 0
CM303.44 16
Memory mapping using page table
Page no. displacement
1101000110110
Page no. block no. Presence bit
000 0
Main memory
001 01 1
Block 0
010 11 1
011 0 001000110110 Block 1
100 10 1 Main memory address register
Block 2
101 0
Block 3
110 00 11
111 0
Fig. 4
MBR
00 1
CM303.44 17
Paging
• 3 high-order bits are used to access the page
table
CM303.44 18
Paging
• If presence bit is 0 then a page fault trap is
generated
CM303.44 19
Summary
CM303.44 20
QUIZ
CM303.44 21
1. Address space is divided into
a) blocks
b) Frames
c) pages
d) addresses
CM303.44 22
1. Address space is divided into
• blocks
• Frames
• pages
• addresses
CM303.44 23
2. The two parts of virtual address are
CM303.44 24
2. The two parts of virtual address are
CM303.44 25
Frequently asked Questions
CM303.44 26
Frequently asked Questions