6ProtectionAssociate valid/invalid bit with each segment table entry to indicate if the referenced segment is part of the process address space or notRead, write, and execute bits to define legal operations on a segment
7Paged SegmentationDivide every segment in a process into fixed size pagesNeed for a page table per segmentCPU’s memory management unit must support both segmentation and paging
10Paged SegmentationLogical address is still <s,d>, with s used to index the segment tableEach segment table entry consist of the tuple <segment-length, page-table-base>The logical address is legal if d < segment-length
11Paged SegmentationSegment offset, d, is partitioned into two parts: p and d’, where p is used to index the page table associated with segment, s, and d’ is used as offset within a page
12offset within the page p Paged Segmentationp indexes the page table to retrieve frame, f, and physical address (f,d’) is formedsdindex segment tablepd’index page tableoffset within the page p
14MULTICS Example s is 18 bits and d is 16 bits GE 345 processor Logical address = 34 bitsPage size = 1 KBs is 18 bits and d is 16 bitsSize of p and d’, largest segment size, and max. number of segments per process?
15MULTICS Example Largest segment = 2d bytes = 216 bytes Maximum number of pages per segment = 216 / 1 K = 64|p| = log2 64 bits = 6 bits|d’| = log2 1 K = 10 bitsMaximum number of segments per process = 2s = 218
17MULTICS ExampleConsider a process with its segment 15 having 5096 bytes. The process generates a logical address (15,3921).Is it a legal address?How many pages does the segment have?What page does the logical address refer to?
18MULTICS Example Is it a legal address? Yes How many pages does the segment have?ceiling[5096/1024]= 5What page does the logical address refers to?ceiling[3921/1024]= 4(i.e., page number 3)
19MULTICS ExampleWhat are the value of d’ and the physical address if page number 3 (i.e., the fourth page) is in frame 12?d’ = 3921 – 3*1K = 849Physical address = 12*1K = 13137
20MULTICS Example 15 3921 3 849 s d p d’ page table for segment 15 12 1 123412page table forsegment 15