Lecture Notes for Operating Systems

Segmented Memory, 15 November 2000


  1. separate but related address spaces

    1. better protection - finer granularity

    2. better utilization - less empty space

    3. sharing

  2. segments

    1. variable length virtual memory

    2. virtual address - segment number, segment offset

  3. advantages over vm

    1. simplified linking and loading

    2. local changes stay local

    3. sharing is easy

  4. pure segmentation

    1. variable length

      1. partitionless multiprogramming

      2. external fragmentation

  5. paged segmentation - multics

    1. 18-bit segment id, 16-bit segment offset

    2. segment table

      1. paged

      2. segment descriptor - page table physical addr, seg len in pages, page size (1k or 64 bytes), paged bit, protection bits

      3. virtual address: segment id, (page no, page offset)

      4. tlb - 16 page cache

  6. example - intel

    1. segment descriptor - 16-bit segment id, 30-bit segment offset

    2. local and global descriptor tables; process and system address spaces

    3. segment selector - 13 bit description index, 1 bit global-local indicator, 2 bit protection level

    4. segment descriptor - 32-bit base addr, 20-bit limit, limit units, segment size, paged bit, privilege, system-user, type

    5. vm -> (16-bit segment id, 30-bit offset) -> 32-bit base + offset = linear address -> physical address (no paging) or virtual address (paging)

    6. paging - two-level tables, directory to table to page

      1. 32-bit vm -> 10-bit directory index, 10-bit page index, 12-bit offset

      2. page table tlb

  7. protection rings or layers

    1. outward access acceptable, inward accesses prohibited

    2. protected procedure calls allow low to high procedure calls - gateways, traps and interrupts.


This page last modified on 20 November 2000.