Lecture 13 Memory Management I PowerPoint PPT Presentation

presentation player overlay
1 / 14
About This Presentation
Transcript and Presenter's Notes

Title: Lecture 13 Memory Management I


1
Lecture 13Memory Management I
  • Background
  • Memory Management Requirements

2
Parts of a Program
  • Information used as operands
  • Constant (never changes)
  • Variables (changes)
  • Static
  • Dynamic
  • Instructions
  • Specify the operations to be performed and the
    operands to use in the operations

3
Memory needed by a running process
4
Binding of Instructions and Data to Memory
Compile time
5
Binding of Instructions and Data to Memory Load
time
6
Binding of Instructions and Data to
MemoryExecution Time
7
Memory Management Requirements
  • Relocation
  • programmer does not know where the program will
    be placed in memory when it is executed
  • while the program is executing, it may be swapped
    to disk and returned to main memory at a
    different location
  • memory references must be translated in the code
    to actual physical memory address

8
Swapping
9
Memory Management Requirements
  • Protection
  • processes should not be able to reference memory
    locations in another process without permission
  • impossible to check addresses in programs since
    the program could be relocated
  • must be checked during execution

10
Memory Management Requirements
  • Sharing
  • allow several processes to access the same
    portion of memory
  • better to allow each process (person) access to
    the same copy of the program rather than have
    their own separate copy

11
Memory Management Requirements
  • Logical Organization
  • programs are written in modules
  • different degrees of protection given to modules
    (read-only, execute-only)
  • share modules

12
Memory Management Requirements
  • Physical Organization
  • memory available for a program plus its data may
    be insufficient
  • overlaying allows various modules to be assigned
    the same region of memory
  • secondary memory cheaper, larger capacity, and
    permanent

13
Overlays
14
Memory Manager Responsibilities
  • Keep track of which parts of memory are currently
    being used and by whom
  • Decide which processes are to be loaded into
    memory and when memory space becomes available
  • Allocate and deallocate memory space as needed
Write a Comment
User Comments (0)
About PowerShow.com