Sei sulla pagina 1di 17

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 : Segmentation scheme of
Virtual Memory
Teaching aids : PPT,drawings
CM303.45 1
Do you Know

• What is meant by address mapping?

• What are various address mapping techniques?

• What is paging?

CM303.45 2
Recap of previous lesson

• Various mapping techniques


• Paging scheme
• Segmentation scheme
• Paging scheme
• divides address space in to pages and memory
space in to blocks
• Maintains a page table that keeps track of which
pages are loaded and which are not loaded in to
main memory

CM303.45 3
Objectives

On completion of this period you would be able to


explain

• The segmentation scheme of virtual memory


system

CM303.45 4
Introduction
• In virtual memory system CPU generates virtual
addresses that refer instructions and data of a
program

• To execute a program the virtual addresses


must be mapped on to physical addresses

• Two address mapping schemes


• Paging scheme
• Segmentation scheme
CM303.45 5
Segmentation
Contd.,

• A technique used to translate virtual addresses on


to physical addresses

• Virtual memory is divided in to unequal parts


called segments

• A segment is a set of logically related instructions


and data associated with a given name

CM303.45 6
Segmentation Contd.,

• Segments correspond to logical entities such as


programs, data structures, subroutines etc.,

• logical address of an instruction or data is divided


in to three fields
• Segment field
• Page field
• Displacement
• Process of mapping is shown in fig.1

CM303.45 7
Mapping using segmentation process
Logical address
Segment (s) page (p) displacement (d)

A
A+p
Buffer
B
register
Segment table
Page table

B d
Fig .1
CM303.45 Physical address 8
Segmentation Contd.,

• Two tables namely segment table and page table


are used to map the logical address

• Segment part (s) of the logical address is used as


an index to the segment table

• Segment table contains a list of addresses for


page table base

CM303.45 9
Segmentation
• Steps involved in mapping process

i. Segment number (s) is used to access segment table


ii. Value (A) at the location (s) is taken in to a buffer
iii. Value (A) is then added with the page number (p)
iv. The sum is a pointer to an entry in the page table
v. Value (B) found in the page table is taken in to a buffer
vi. Value (B) is then added to the displacement (d) of the
logical address to get the final physical address

CM303.45 10
Summary

• In this class you have studied about


• Segmentation Address mapping scheme
• Supports user view of memory
• Logical address space is divided in to unequal parts
• Logical address is divided in to segment no. , page
no., and displacement

CM303.45 11
QUIZ

CM303.45 12
1. In segmentation address space is divided into
a) equal size segments
b) Unequal size frames
c) Equal size pages
d) Unequal size segments

CM303.45 13
1. In segmentation address space is divided into
• equal size segments
• Unequal size frames
• Equal size pages
• Unequal size segments

CM303.45 14
2. The two tables used in segmentation scheme are

a) Page table and block table


b) Block table and frame table
c) Segment table and page table
d) Page table and displacement

CM303.45 15
2. The two tables used in segmentation scheme are

• Page table and block table


• Block table and frame table
• Segment table and page table
• Page table and displacement

CM303.45 16
Frequently asked Questions

1. Explain segmentation mapping of virtual


memory system

CM303.45 17

Potrebbero piacerti anche