12
ITFN 2601 Introduction to Operating Systems Lecture 16 Segmentation

ITFN 2601 Introduction to Operating Systems Lecture 16 Segmentation

Embed Size (px)

Citation preview

ITFN 2601Introduction to Operating

Systems

Lecture 16

Segmentation

Segmentation vs Paging?

Paging is incidental

Page-data is heterogeneous

Statically Sized

Segments are intentional

Segment data is homogenous

Dynamically Sized

Pure Segmentation

Segment size varies and changesExternal Fragmentation

Also called “Checkerboarding”Swapping large segments for smallResolution: Compaction

MULTICS Implementation

Similar to Multi-Level PagingAddress contains Segment # for tableSegment table holds Segment DescriptorsDescriptor contains page table locationStandard Page Table

Has 218 segments 216 Pages With 36-bit entries234 Total Pages

MULTICS Segment Descriptor

Page Table addressSegment SizeScale and Paged bits

Multics Lookup

Pentium Implementation

Local/Global Descriptor TableLocal contains program informationGlobal is OS information3-level Paging (Segment +2-level Virtual)

213 Global + 213 Local (per Program) Segments214 Total Segments per program232 Pages with 32-bit entries246 Total Pages

Pentium Code Descriptor

In-memorySystem or Application segmentType & Protection (Code/Data)Segment Scale (16-bits or all 32?)

Pentium 2-level Paging

Pentium Protection

2-bit Protection EntryAccess granted to all

higher levels00 (0) Can access all11 (3) Can access 3

Easy to decide access rights

Must make paths for system calls