Memory Management -1

Memory Management -1 - Operating Systems Real Memory...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Operating Systems Real Memory Management
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Real Memory Management Background Memory Management Requirements Fixed/Static Partitioning Variable/Dynamic Partitioning Simple/Basic Paging Simple/Basic Segmentation Segmentation with Paging
Background image of page 2
3 Background Program must be brought into main memory and placed within a process representing it, in order for it to be run. Memory management is the task carried out by the OS and hardware to accommodate multiple processes in main memory. User programs go through several steps before being able to run. This multi-step processing of the program invokes the appropriate utility and generates the required module at each step (see next slides).
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Multi-step Processing of a User Program
Background image of page 4
5 Steps for loading a process in memory
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Object Module Public names are usable by other object modules. External names are defined in other object modules: Includes the list of instructions having these names as operands. Relocation dictionary: Has the list of instructions who’s operands are addresses (since they are relocatable). Only code and data will be loaded in physical memory: The rest is used by the linker and then removed. The stack is allocated only at load time. End of module Relocation dictionary Data Machine code External names table Public names table Module identification
Background image of page 6
7 Object Modules Initially, each object module has its own address space. All addresses are relative to the beginning of the module.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Linking Static The linker uses tables in object modules to link modules into a single linear addressable space. The new addresses are addresses relative to the beginning of the load module.
Background image of page 8
9 Dynamic Linking The linking of some external modules is done after the creation of the load module (executable file). Load-time dynamic linking: The load module contains references to external modules which are resolved at load time. Run-time dynamic linking: references to external modules are resolved when a call is made to a procedure defined in the external module. unused procedure is never loaded. Process starts faster.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Static vs. Load-time Dynamic Linking
Background image of page 10
Program vs. Memory sizes What to do when program size is larger than the amount of memory/partition (that exists or can be) allocated to it? There are two basic solutions within real
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 35

Memory Management -1 - Operating Systems Real Memory...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online