1 / 8

Segmentation systems

Segmentation systems. In segmentation, programs are divided into variable size segments. Every logical address is formed of a segment number and an offset within that segment. Programs are segmented automatically by the compiler or assembler. Segmentation systems.

Télécharger la présentation

Segmentation systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Segmentation systems • In segmentation, programs are divided into variable size segments. • Every logical address is formed of a segment number and an offset within that segment. • Programs are segmented automatically by the compiler or assembler.

  2. Segmentation systems • Memory-management scheme that supports user view of memory. • A program is a collection of segments. A segment is a logical unit such as: main program, procedure, function, method, object, local variables, global variables, common block, stack, symbol table, arrays

  3. User’s View of a Program

  4. Segmentation Architecture • Logical address consists of a two tuple: <segment-number, offset>, • Segment table – maps two-dimensional physical addresses; each table entry has: • base – contains the starting physical address where the segments reside in memory. • limit – specifies the length of the segment. • For logical to physical address mapping, a segment table (ST) is used. When a logical address <segment #,d> is generated by the processor: • Check if ( 0 ≤ d < limit ) in ST. • If o.k., then the physical address is calculated as Base + d, and the physical memory is accessed at memory word ( Base + d ).

  5. Segmentation Hardware

  6. Example of Segmentation

  7. Example of Segmentation • For example, assume the logical address generated is <1,123> • Check ST entry for segment #1. The limit for segment #1 is 400. Since 123<400,we carry on. • The physical address is calculated as: 9300 + 123 = 9423, and the memory word 9423 is accessed.

  8. Sharing of Segments

More Related