Professional Documents
Culture Documents
Memory Management
Contents:-
Memory Management
Contiguous and Non-Contiguous storage allocation
Swapping
Paging
Segmentation
Memory allocation method
Logical vs physical address space
Cont....
Definition:-
Memory management is the process of controlling and coordinating
computer memory, assigning portions called blocks to various running programs
to optimize overall system performance.
Purpose:-
In operating systems, memory management is the function
responsible for managing the computer's primary memory. It determines how
memory is allocated among competing processes, deciding which gets memory,
when they receive it, and how much they are allowed.
Diagram:-
Contiguous Memory Allocation Versus Non Contiguous Memory Allocation
Definition:-
Swapping is a mechanism in which a process can be swapped
temporarily out of main memory (or move) to secondary storage (disk) and make
that memory available to other processes. At some later time, the system swaps
back the process from the secondary storage to main memory.
Though performance is usually affected by swapping process but it helps in
running multiple and big processes in parallel and that's the reason Swapping is
also known as a technique for memory compaction.
BENEFITS OF SWAPPING
Definition :
Paging is fixed size partitioning scheme .
In paging secondary memory and main memory are divided inti equal
fixed size partition .
The partition of secondary memory are called pages .
The partitions of main memory are called as frames.
Each process is divided into parts where size of each part is same as
page size.
EXAMPLE
P3
P0
P2
BENEFITS OF PAGING
Definition:
Segmentation is a memory management technique which
supports user's view of memory. This technique of division of a
computer's primary memory into sections called segments.
TYPES OF SEGMENTATION
Definition :
the segment table contain information about the relationship
of the segments and regions in the program. During execution the
table also contains control information such as what segments are in
storage and which are being loaded.
DIAGRAM OF SEGMENTATION
MEMORY ALLOCATION METHOD
Definition:-
Memory allocation is the process of setting aside
sections of memory in a program to be used to store variables, and
instances of structures and classes. When you declare a variable or
an instance of a structure or class. The memory for that object
is allocated by the operating system.
LOGICAL VS PHYSICAL ADDRESS
SPACE
DEFINITION:-
As processes are loaded and removed from memory, the free memory space is broken into
little pieces. It happens after sometimes that processes cannot be allocated to memory
blocks considering their small size and memory blocks remains unused. This problem is
known as Fragmentation.
FRAGMENTION is of two types :
External fragmentation
Total memory space is enough to satisfy a request or to reside a process in it, but it is
not contiguous, so it cannot be used.
Internal fragmentation
Memory block assigned to process is bigger. Some portion of memory is left unused, as
it cannot be used by another process.