0% found this document useful (0 votes)
267 views15 pages

Pure Segmentation

Segmentation divides a process's address space into multiple segments. Each segment can grow and shrink independently and be shared between processes. Segments are allocated like variable partitions with memory management hardware decoding addresses. User views of memory are of segments, while hardware uses a segment table to map logical segment addresses to physical linear addresses. Segmentation allows for easier growing, shrinking, protection and linking of memory but can result in external fragmentation from crude partitions of large or small segments.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
267 views15 pages

Pure Segmentation

Segmentation divides a process's address space into multiple segments. Each segment can grow and shrink independently and be shared between processes. Segments are allocated like variable partitions with memory management hardware decoding addresses. User views of memory are of segments, while hardware uses a segment table to map logical segment addresses to physical linear addresses. Segmentation allows for easier growing, shrinking, protection and linking of memory but can result in external fragmentation from crude partitions of large or small segments.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

Segmentation

Several address spaces per process a compiler needs segments for -source text

-symbol table -constants segment -stack

-parse tree
-compiler executable code

Most of these segments grow during execution

In pure segmentation architecture,segments are allocate like variable partitions, although the memory management hardware is involved in decoding addresses.

Pure segmentation addresses replace the page identifier in the virtual address with a segment identifier, and find the proper segment (not page) to which to apply the offset.

User's view of segments

Segment Table

Hardware of Segmentation

Advantages: o Growing and shrinking independently o Sharing between processes simpler o Linking is easier o Protection easier Disadvantages: o Crude partition (each segment can be very large or very small) o Pure segmentation --> external Fragmentation revisited

Segmentation Architecture
Logical address composed of the pair <segment-number, offset> Segment table maps to linear address space; each table entry has:
o base contains the starting linear address where the segment resides in memory o limit specifies the length of the segment

Segment-table base register (STBR) points to the segment tables location in memory Segment-table length register (STLR) indicates number of segments used by a program; segment number s is legal if s < STLR

Segmentation Architecture (Cont.)

Protection: each segment table entry contains: o validation bit = 0 illegal segment o read/write/execute privileges Protection bits associated with segments; code sharing occurs at segment level Since segments vary in length, memory allocation is a dynamic storage-allocation problem (external fragmentation problem)

Sharing of segments

Segmentation with Paging


Segments may be too large Cause external fragmentation The two approaches may be combined:
o Segment table o Pages inside a segment o Solves fragmentation problems

Most systems today use a combination of segmentation and paging

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy