Overlays in Memory Management


Overlay memory management technique allows multiple programs to be loaded into memory simultaneously, but only a portion of each program is resident in memory at any given time. This is used to increase the overall memory utilization and efficiency of the computer system. The technique swaps different parts of the programs in and out of memory as required.

The overlay memory management technique is commonly used in situations where the memory requirements of the programs exceed the available physical memory. In such cases, the operating system can load the program into the memory in smaller sections, known as overlays. Each overlay contains a portion of the program code and data that is required to execute a specific function. When the program needs to execute different function, it is swapped out of the memory, and a new overlay is loaded.

Memory management is a crucial part of modern computer systems. It enables efficient allocation and reallocation of memory resources to various processes. The process includes dividing the available memory space into smaller parts, which are then allocated to individual processes. However, as the number of processes and their memory requirements increases, there arises a need for a more advanced technique to allocate and manage memory. In this way, we can say that the overlay memory management technique is one such that can be used to allocate and manage memory in your computer systems efficiently.

Advantages of Overlay Memory Management

Improved Memory Utilization

Overlay memory management gives efficient utilization of memory resources by loading multiple programs into memory simultaneously, even though the available physical memory is limited.

Reduced Memory Fragmentation

Overlay memory management reduces the problem of memory fragmentation. It allows programs to be loaded into memory in smaller sections, which are then easily swapped in and out of memory as required.

Reduced Memory Access Time

Overlay memory management decreases the memory access time by loading only the required sections of a program into memory instead of loading the entire program.

Improved Performance

Overlay memory management can improve the performance of the computer system through a reduced amount of time spent in swapping programs in and out of memory.

Reduced Memory Footprint

Overlay memory management reduces the memory footprint of the programs. It only allows the required sections of a program to be loaded into the memory instead of loading the entire program.

Disadvantages of Overlay Memory Management

Despite all its advantages, this overlay memory management strategy still has certain downsides.

Increased Complexity

The complexity of the memory management system is increased by overlay memory management. For handling the overlays, extra hardware and software support is needed.

Limited Address Space

The size of the accessible address space is a limitation of the overlay memory management technology. The number of overlays that can be put into memory at once is constrained as a result.

Increased Overhead

It makes the memory management system's overhead higher. To control the overlays, extra memory management actions are needed.

Fragmentation of Code and Data

It can fragment the code and data of a programme by making it into smaller portions, which may degrade its performance.

Types of Overlay Memory Management

Fixed Overlay

The size and position of each overlay are predetermined in fixed overlay memory management, and the system loads each overlay into a particular region of memory. In systems where the size of each programme and its overlays are known in advance, fixed overlays are frequently utilised.

Shifting Overlay

With shifting overlay memory management, the system switches overlays in and out of memory as necessary, depending on the programme's current memory needs. In systems where the size of each programme and its overlays are not known in advance, swapping overlays is frequently used.

Demand Paging Overlay

The system only loads the necessary parts of each overlay into memory based on the programme's current memory needs. This is known as demand paging overlay memory management. As needed, the remaining parts of the overlay are loaded into memory. Overlays for demand paging are frequently employed in virtual memory systems.

Variable Partition Overlay

Memory management with variable partition overlays divides the available memory into partitions of varying sizes, with each overlay being loaded into its own partition. In systems where the size of each programme and its overlays are not known in advance, variable partition overlays are frequently employed.

Overlay memory management applications

Batch Processing

Overlay memory management is often employed in batch processing systems, where numerous programmes are executed consecutively. Through the use of overlay memory management, the system can only load the necessary parts of each programme into memory, increasing overall efficiency and memory resource utilisation.

Interactive Systems

In interactive systems, where numerous users may be running various programmes simultaneously, overlay memory management is also used. The likelihood of a system crash brought on by running out of memory is decreased by adopting overlay memory management, which allows the system to more effectively allocate memory resources.

Multimedia Systems

Overlay memory management is utilised in multimedia systems where processing of high-resolution photos, movies, and audio data necessitates huge quantities of memory. The system can more effectively allocate memory resources by adopting overlay memory management, which lowers the overall memory footprint of multimedia programmes.

Virtual Memory

It is also used in virtual memory systems, here the system can use secondary storage devices such as hard disks, to temporarily store portions of programs that are not currently in use. By using overlay memory management technique in virtual memory systems, the system can efficiently manage the allocation and deallocation of memory resources.

Conclusion

By allowing numerous programmes to load into memory at once, overlay memory management is a memory management strategy that promotes effective utilisation of memory resources. The technique can increase the performance of the computer system by minimising the memory access time and memory footprint of the programmes. However, overlay memory management can also increase the complexity and overhead of the memory management system, and it is restricted by the size of the address space accessible to the computer system. Overlay memory management is a practical method for controlling memory in computer systems with less physical memory, notwithstanding its drawbacks.

Updated on: 20-Jul-2023

786 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements