Memory Organization & Management

Memory divided into tiers
  • Main memory
    • Relatively expensive
    • Relatively small capacity
    • High-performance
  • Secondary storage
    • Cheap
    • Large capacity
    • Slow
Memory management is the functionality of an operating system which manages primary memory and moves processes back and forth between main memory and disk during execution. Memory management keeps track of each and every memory location, regardless of either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or un-allocated and correspondingly it updates the status.

Memory Hierarchy
Main memory requires careful management. Memory can be organized in different ways
  • One process uses entire memory space
  • Each process gets its own partition in memory
  • Dynamically or statically allocated
So Memory Management is about Strategies for obtaining optimal memory performance and this role is Performed by memory manager. Memory Manager decides 
  • Which process will stay in memory?
  • How much memory will each process have access to?
  • Where in memory will each process go?

Memory Management Strategies
Strategies divided into several categories
  • Fetch strategies
    • Demand or anticipatory
    • Decides which piece of data to load next
  • Placement strategies
    • Decides where in main memory to place incoming data
  • Replacement strategies
    • Decides which data to remove from main memory to make more space
Contiguous vs. Noncontiguous Memory Allocation
  • Contiguous allocation
    • Program must exist as a single block of contiguous addresses
    • Sometimes it is impossible to find a large enough block
    • Low overhead
  • Noncontiguous allocation
    • Program divided into chunks called segments
    • Each segment can be placed in different part of memory
    • Easier to find “holes” in which a segment will fit
    • Increased number of processes that can exist simultaneously in memory offsets the overhead incurred by this technique


Visit My Blog: vinay-kumar-saini.blogspot.com/

No comments:

Post a Comment