0% found this document useful (0 votes)
65 views

Segmentation With Paging

Uploaded by

anavadeepcs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

Segmentation With Paging

Uploaded by

anavadeepcs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

PAGING

WITHSEGMENTATION
SEGMENTATION
• MEMORY-MANAGEMENT SCHEME THAT SUPPORTS USER VIEW OF MEMORY.

• A PROGRAM IS A COLLECTION OF SEGMENTS


SEGMENT
A segment is a logical unit such
as:
1. Procedure
2. Function
3. Method
4. stack
symbol
table
USER‘S VIEW OF THE PROGRAM
• Each of the segments are of different length.
• The segments are numbered and are
referred to by a segment number.
• The logical address of the segment consists
of segment number and an offset.
• Each process have separate segment table.
• Each segment table consists of segment no,
its length, base address and access rights.
SEGMENTATION HARDWARE
SEGMENTATION HARDWARE
• Logical address consists of a two tuple:
<segment-number, offset>,
• Each segment table consists of segment
no, its length, base address and
access rights.
• Segment-table base register (STBR) points
to the segment table’s location in
memory
• Segment-table length register (STLR)
indicates number of segments used by a
program;
PROTECTION FOR SEGMENTATION
• Protection
–With each entry in segment table
associate:
• validation bit = 0  illegal
segment
• read/write/execute privileges

• Protection bits associated with segments;


code sharing occurs at segment level
ADVANTAGES OF SEGMENTATION
• Eliminates Fragmentation
• Protection mechanism is good
• Allows shared segments among users
• Dynamic loading and linking of segments
is possible
• Allow dynamic growing of segments
• Supports modular programming
Paging Segmentation
The main memory is The main memory is
divided into fixed size divided into variable sized
partitions called pages partitions called segments
OS maintains a page map table OS maintains a segment table
Page table consists of two Segment table consists of
parts - page number and three parts segment number ,
frame number base address and limit
Processes use the page Processes use segment
number and offset to number and offset to
calculate physical address calculate physical address
It does not support It supports modular
modular programming programming
It does not support dynamic It supports dynamic growth
growth of pages of segments
WHICH MEMORY-
MANAGEMENT SCHEME
SUPPORTS USER VIEW OF
MEMORY?
THE LOGICAL ADDRESS OF THE
SEGMENT CONSISTS OF
and an
Each segment table consists of
segment no, its ,
address and
Segmentation has no effect on
Fragmentation

• True
• False

You might also like