Basically memory management entails all processes that pertain to the handling of computer memory. It is all about streamlining and optimizing the overall performance of the computer. This is premised on the fact that computers operate using a multitasking or multiprogramming environment. This implies that there is a need for running processes or programs to be allotted memory space as and when it is needed. Memory management is spectrum that characterises virtually every part of a computer system. We are referring to both hardware and software. In this article we shall be discussing what memory management in computers is all about.

 

Why Is Memory Management Important?

Let us start by looking why at memory management is such an important of computers and computer systems. Programs or applications always require adequate memory allocations at any given time. Memory management plays a critical role in ensuring that. You must understand that there is a lot that is involved with regards to memory space. At some point it has to be allocated, at some point it has to be reallocated. Sometimes it has to be segmented and several other processes.

Without memory management there would be complete chaos. One relatable real life example that can illustrate this whole framework is traffic lights. What traffic lights do in regulating the use of spaces at junctions is sort of what memory management entails. Let us now look at core aspects of memory management – we will discuss some processes involved in memory management.

 

Different Types Of Memory

Before discussing anything else, it vital that you know the types of memory – it is foundational. There are two broad clusters of memory i.e. dynamic memory and static memory. Some can use terms like virtual memory and physical memory. Virtual memory is basically memory that comes off as main memory yet being mostly facilitated by secondary storage. Physical memory is memory that is actually from the system. It is also known as primary memory or RAM (random access memory).

 

Memory Allocation

When programs or applications have to run they are allocated memory space. This can be done by either of two possible ways namely, static and dynamic. What happens with static memory allocation is that the program or application is loaded first before execution occurs. In essence this means memory is allocated at compiling time. When it is dynamic there is no prior process involved – the program or application is loaded and run instantly. In the same vein, here memory is allocated at running time.

In the process of memory allocation there two partitions involved. They are either low memory or high memory. Just to differentiate the two, the operating system is housed in the low memory whereas other programs or application you will normally use are housed in the high memory. Memory allocation can either be single partition or multiple partition.

 

Memory Fragmentation

When programs or applications are running they sometimes tend to not take up all the allocated memory. This results in the creation of some holes in the memory. These memory holes are usually unusable thus making programs or applications that might want to use them deprived of memory space. This ultimately leads to incidences of system challenges where it would seem there are no resources available yet there would be. Memory management plays the role of dealing with memory fragmentation because it is a problem. This can be done by either compaction or allocating the smallest (but adequate) partitions possible. Later on we shall discuss about swapping – it is one of the ways used in compaction.

 

Swapping

This is an interesting process in memory management. What happens is that part of the memory space on a peripheral or secondary storage device is used by a system as its own. It is the system (e.g. an operating system) that picks the memory space it wants to use on the device in question. You probably get the ‘swapping’ sense from that we suppose. For as long as the storage is hooked in that swap space will be the system’s. It can be relinquished as needs be – even whilst the storage device is still connected. What this all does is that it somehow increases or expands the memory capacity of the system in question.

 

Paging

Paging is characteristic of virtual memory in logical addresses. Paging then is the process of apportioning that memory into smaller memory units. Those units are what are then referred to as pages. How many those units can be or how big they can be differs from system to system. This all sounds very simple and straightforward but it is a very elaborate process. This process can effectively help in scenarios where the physical memory is not big enough to cater certain running programs or applications.

 

Memory Segmentation

This is something that occurs in the primary memory of a computer. What happens is that the memory is subdivided into separate chunks with unique addresses. This forms the basis for effectively allocating memory which in turn optimizes how the overall system performs. There are two types of memory segmentation namely, virtual memory segmentation and simple memory segmentation. Virtual memory segmentation entails what also happens in simple segmentation (a process which we already explained a moment). The key distinguishing factor for virtual memory segmentation is that some of the segments might be located where the others are.

 

Memory management is a very complex subject because there are so many technical things to talk about. In this article we endeavoured to be as simplistic as possible so that they get the gist of the basic tenets of memory management.