Memory Management in Operating Systems: A Comprehensive Guide, Summaries of Operating Systems

A comprehensive overview of memory management in operating systems. It covers fundamental concepts such as memory allocation, fragmentation, paging, and segmentation. The importance of memory management, explores different techniques, and discusses the advantages and disadvantages of each approach. It is a valuable resource for students and professionals seeking to understand the principles and practices of memory management in operating systems.

Typology: Summaries

2023/2024

Available from 12/20/2024

exam_master
exam_master 🇰🇪

17 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MEMORY MANAGEMENT
IN OPERATING
SYSTEM
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Memory Management in Operating Systems: A Comprehensive Guide and more Summaries Operating Systems in PDF only on Docsity!

MEMORY MANAGEMENT

IN OPERATING

SYSTEM

What Is Memory Management In OS?

  • Memory Management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution.
  • It is the most important function of an operating system that manages primary memory. It helps processes to move back and forward between the main memory and execution disk.
  • It helps OS to keep track of every memory location, irrespective of whether it is allocated to some process or it remains free.
  • Moreover, to increase performance, several processes are executed simultaneously. For this, we must keep several processes in the main memory, so it is even more important to manage them effectively.

Partition Allocation

Memory is divided into different blocks or partitions. Each process is allocated according to the requirement. Partition allocation is an ideal method to avoid internal fragmentation. Below are the various partition allocation schemes :

  • First Fit: In this type fit, the partition is allocated, which is the first sufficient block from the beginning of the main memory.
  • Best Fit: It allocates the process to the partition that is the first smallest partition among the free partitions.
  • Worst Fit: It allocates the process to the partition, which is the largest sufficient freely available partition in the main memory.
  • Next Fit:^ It is mostly similar to the first Fit, but this Fit, searches for the first sufficient partition from the last allocation point. It allows you to check how much memory needs to be allocated to processes that decide which processor should get memory at what time.

Memory Management Techniques

1) Single Contiguous Allocation: It is the easiest memory management technique. In this method, all types of computer’s memory except a small portion which is reserved for the OS is available for one application. Example: MS-DOS and embedded OS. 2) Partitioned Allocation: It divides primary memory into various memory partitions, which is mostly contiguous areas of memory. Every partition stores all the information for a specific task or job. This method consists of allotting a partition to a job when it starts & unallocated when it ends. 3) Paged Memory Management: This method divides the computer’s main memory into fixed-size units known as page frames. This hardware memory management unit maps pages into frames which should be allocated on a page basis. 4) Segmented Memory Management: Segmented memory is the only memory management method that does not provide the user’s program with a linear and contiguous address space. Segments need hardware support in the form of a segment table.

What Is Fragmentation?

Two types of Fragmentation methods are:

  • External fragmentation: External fragmentation can be reduced by rearranging memory contents to place all free memory together in a single block.
  • Internal fragmentation: The internal fragmentation can be reduced by assigning the smallest partition, which is still good enough to carry the entire process.

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.

What Is Paging?

Paging is a technique that eliminates the

requirements of contiguous allocation of main memory.

In this, the main memory is divided into fixed-size blocks

of physical memory called frames. The size of a frame

should be kept the same as that of a page to maximize

the main memory and avoid external fragmentation.

Here, are major benefits/pros of Paging:

  • Pages reduce external fragmentation.
  • Simple to implement.
  • Memory efficient.
  • Due to the equal size of frames, swapping becomes

very easy.

  • It is used for faster access of data.

End OF

Presentation

THANK YOU !!