Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 20

DEPARTMENT OF TECHNICAL EDUCATION

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 : Address Mapping in Virtual System
Teaching aids : PPT,drawings
CM303.43 1
Do you Know

• What is physical address?

• What is logical address?

CM303.43 2
Recap of previous lesson
• Virtual address
• address used by the programmer to indicate the
position of instructions and data
• Virtual address space
• Set of virtual addresses
• Physical address
• Address of a word in main memory
• Physical address space
• Set of physical addresses

CM303.43 3
Virtual memory

CM303.43 4
Objectives

On completion of this period you would be able to


know about
• The address mapping in virtual memory system
• Various address mapping techniques used
virtual memory

CM303.43 5
Introduction
• Virtual addresses
– Refer to instructions and data stored in secondary
memory
– Generated by CPU
– Must be translated in to physical addresses

• Virtual address mapping or translation is handled


automatically by the memory management unit

CM303.43 6
Address mapping
Contd..
• Let V be the set of virtual addresses generated by
the program
• Let M be the set of physical addresses allocated to
run program
• To execute the program the virtual addresses must
be mapped on to physical address space
• This process of translation is called address mapping
or address binding
• Mapping process can be viewed as a function
f: V M
CM303.43 7
Address mapping Contd..

illustration : consider a computer system with


• Address space of 8K (secondary memory)
• Memory space of 4 K (physical memory)
• 13 bits are required to specify a logical address
• 12 bits are required to specify a physical address
• Translation of 13-bit address in to 12-bit address is
called as mapping

CM303.43 8
Address mapping Contd..
• Relation between address and memory space in
a virtual memory system is shown in the fig 4.8.
Auxiliary memory
Main memory

program1
Data 1,1
program1
Data 1,2

program2 Data 1,1

Data 2,1
memory space M=4 K
Address space V=8 K
Fig 1
CM303.43 9
Address mapping Contd..

• CPU refer instructions and data with 13 bit


logical address
• But this address must be mapped in to 12 bit
physical address
• A mapping table is used to map a 13 bit virtual
address in to a 12 bit physical address
• The virtual address translation system and
mapping table is shown in fig 4.9
CM303.43 10
Address mapping Contd..
Virtual address

Main
Virtual Memory Main
memory
address mapping memory
address
register table register

Memory table Main Memory


buffer register buffer
register
Fig 2
CM303.43 11
Various Address mapping schemes

Various address mapping techniques used

• Paging scheme
• Segmentation scheme

CM303.43 12
Summary
• In this class you have studied that
• Address mapping
• Translation of virtual addresses in to physical
addresses
• various mapping techniques
• Paging scheme
• Segmentation scheme

CM303.43 13
QUIZ

CM303.43 14
1. Translation of virtual address in to physical
address is called
a) data mapping
b) Address mapping
c) Instruction binding
d) Control information

CM303.43 15
1. Translation of virtual address in to physical
address is called
• data mapping
• Address mapping
• Instruction binding
• Control information

CM303.43 16
2. One virtual address mapping scheme is

a) Associative scheme
b) Segmentation scheme
c) Both a and b
d) None of the above

CM303.43 17
2. One virtual address mapping scheme is

• Associative scheme
• Segmentation scheme
• Both a and b
• None of the above

CM303.43 18
Short Answer Questions

1.What is meant by virtual address translation?

2.List some virtual address mapping schemes

CM303.43 19
Assignment Questions

1.An address space is specified by 24 bits and the


corresponding memory space by 16 bits

a) How many words are there in the address space?

b) How many words are there in the memory space?

CM303.43 20

You might also like