Hello learners,
As we already learnt that memory is central to the operation of computer system, now we will be learning various ways to manage memory in order to improve the performance of the computer system.
Memory management keeps track of each memory location, regardless of either it is allocated to processes or free.
It decides which process will get memory at what time.
So, there are numerous techniques to allocate memory space to processes.
First technique is Fixed Partitioning, In this main memory is divided into a number of static partitions at system generation time.
A process may be loaded into a partition of equal or greater size.
It is simple enough to implement and little operating system overhead.
On the flipside, causes inefficient use of memory due to internal fragmentation.
Now, what is internal fragmentation?
When memory block assigned to process is bigger. Some portion of memory is left unused, as it cannot be used by another process.
Second technique is Dynamic Partitioning, When main memory is divided into a number of partitions, which are created dynamically, so that each process is loaded into a partition of exactly the same size as that process.
There is no internal fragmentation and consequently more efficient method of managing main memory.
On the contrary, it leads to inefficient use of processor due to the need for memory compaction to reduce external fragmentation process.
Now, question arises here, what is external fragmentation?
Total memory space is enough to satisfy a request or to reside a process in it, but it is not contiguous, it cannot be used and as a result causes waste of memory.
A memory compaction technique can be used to create more free memory out of fragmented memory.
It compacts or shuffles the memory contents to place all free memory together in one large block.
Third technique is Simple Paging, Main memory is divided into a number of equal–size frames.
Each process is divided into a number of equal –size pages of the same length as frames.
A process is loaded by loading all of its pages into available, not necessarily contiguous, frames.
Although there is no external fragmentation still a small amount of internal fragmentation.
Fourth technique is Simple Segmentation Each process is divided into a number of segments.
A process is loaded by loading all of s segments into dynamic partitions that need not be contiguous.
Therefore, no internal fragmentation and improved memory utilization.
Fifth technique is Virtual-Memory Paging, As with simple paging, except that it is not necessary to load all of the pages of a process.
Non-resident pages that needed are brought in later automatically.
Consequently, there is no external fragmentation in higher degree of multi programming with large virtual address space.
On the other hand, it includes overhead of complex memory management.
Sixth technique is Virtual-Memory Segmentation, As with simple segmentation, except that it is not necessary to load all of the segments of a process.
Non-resident segments that are needed are brought in later automatically.
In this technique, no internal fragmentation occurs and higher degree of multi programming with large virtual address space.
Moreover, it supports protection and sharing.
It also includes overhead of complex memory management.
The bring is today end of lecture Thank you....