Limit specifies the length of the segment segment

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ress where the segments reside in memory. • limit – specifies the length of the segment. Segment-table base register (STBR) points to the segment table’s location in memory. Segment Segment-table length register (STLR) indicates number of segments used by a program; segment number s is legal if s < STLR. Segmentation Segmentation Architecture (Cont.) Protection and Sharing is more natural Since segments vary in length, memory allocation is a dynamic storageallocation problem • segments are memory-contiguous • first fit/best fit • external fragmentation Segmentation Segmentation Architecture (Cont.) Protection bits associated with segments • read/write/execute privileges • check STLR for legal segment Sharing Sharing of segments Segmentation Segmentation with Paging – MULTICS The MULTICS system solved problems of external fragmentation and search time to locate contiguous memory by paging the segments. Solution differs from pure segmentation in that the segmenttable entry contains not the base address of the segment, but rather the base address of a page table for this segment. MULTICS MULTICS Address Translation Scheme s1 s2 Memory Memory Pressure Even with paging, segmentation, paged segmentation, memory memory can become “oversubscribed” • Why? we’ve assumed full allocation of VAS until now • lots of large jobs Techniques for dealing with memory pressure • swapping • sharing/load when needed • virtual memory Schematic Schematic View of Swapping not executables Swapping Swapping A process can be swapped temporarily out of memory to a backing process store, and then brought back into memory for continued execution. execution. Backing store – fast disk large enough to accommodate copies of all memory images for all users; must provide direct access to these memory memory images. Roll out, roll in – policy-based – could be priority, age of process, etc etc Major part of swap time is transfer time; total transfer time is directly proportional to the amount of memory swapped. Modified versions of swapping are found on many systems, i.e., UNIX and Microsoft Windows. Only done when severe memory pressure … Dynamic Dynamic Loading and Linking Dynamic loading Routine is not loaded until it is called Dynamic linking (shared libraries) Linking postponed until execution time. Small Small piece of code, stub, used to locate (or load) the appropriate memory-resident library routine. Stub replaces itself with the address of the routine, and executes the routine. routine. Next Next Lecture Virtual Memory Read Chap. 3 Project #2 available on Friday...
View Full Document

Ask a homework question - tutors are online