You are on page 1of 9

MEMORY MANAGEMENT

MEMORY MANAGEMENT

• Memory Management is the process of controlling and coordinating a


computer’s main memory.

• It ensures that blocks of memory space are properly managed and


allocated so the operating system (OS), applications and other running
processes have the memory they need to carry out their operations.
THREE AREAS OF MEMORY MANAGEMENT

1. MEMORY MANAGEMENT AT THE HARDWARE LEVEL

- It concerned with the physical components that store data, most

notably the random access memory (RAM) chips and CPU memory chaches.

Most of the management unit, which controls the processors memory and

caching operations.
THREE AREAS OF MEMORY MANAGEMENT

2. MEMORY MANAGEMENT AT THE OS LEVEL

- It involves the allocation (and constant reallocation) of specific


memory blocks to individual process as demands for CPU resources change.
The OS continuously moves process between memory and storage device (hard
disk or SSD) while tracking each memory location and its allocation status.
THREE AREAS OF MEMORY MANAGEMENT

3. MEMORY MANAGEMENT AT THE PROGRAM?APPLICATION LEVEL

- Memory management at this level is implemented during the application


development process and controlled by the application itself, rather that being managed by
the OS.

- This type of memory management ensures the availability of adequate memory for
the programs objects and data structures. It achieves this by combining two related tasks:

ALLOCATION RECYCLING
A L L O C AT I O N

When the program request memory for an object or data structure,


the memory is allocated to that component until it is explicity freed
up. The allocation process might be manual or automatic.
RECYCLING

When a program no longer needs the memory space that has been
allocated to an object or data structure, that memory is released for
reassignment. This task can be done manually by the programmer or
automatically by the memory manager, a process often called garbage
collection.
F U N C T I O N O F M E M O RY M A N A G E M E N T

- Allocate main memory to a process or to several processes that are to be executed


concurrently;
- Allocate memory to data;
- Protect the memory used by the operating system itself;
- Protect processes from each other when executing concurrently – i.e. to prevent
two processes from using the same memory at the same tie;
- Allow shared access to some areas of memory;
- Free up memory when processes are unloaded and reallocate it to new processes.
THANK YOU!!

You might also like