Open In App

Performance of paging

Introduction:
 

Paging is a memory management technique used in operating systems to divide a process’s virtual memory into fixed-sized pages. The performance of paging depends on various factors, such as:

  1. Page size: The larger the page size, the less the number of page tables required, which can result in faster memory access times. However, larger page sizes also result in internal fragmentation, where memory is wasted due to the difference between the actual size of a process and the size of a page.
  2. Page replacement algorithms: The performance of paging depends on the page replacement algorithm used. Common algorithms include FIFO, LRU, and LFU. The choice of algorithm will affect the number of page faults and the time taken to access a page.
  3. Page table size: The size of the page table used to map virtual addresses to physical addresses affects the speed of memory access. A larger page table results in slower memory access times.
  4. Page table organization: The organization of the page table can also affect the performance of paging. A hierarchical page table, for example, can reduce the size of the page table and increase the speed of memory access.

In general, paging can improve the performance of a system by allowing processes to access more memory than is physically available and by improving the utilization of memory. However, excessive paging can result in slow performance due to a high number of page faults and the overhead associated with accessing the page table.



In this article, we are going to cover the performance of paging and will also cover the expression for evaluating paging performance. Let’s discuss one by one. 

Pre-requisite –Paging in Operating System 



Performance of Paging : Evaluating of paging performance is one of the important tasks. Consider the main memory access time is M and the page table is stored in the main memory then the evaluating expression for effective memory access time is as follows.

Effective Memory Access Time (E.M.A.T) = 2M

Features of Performance of Paging :

Now, let’s see the diagram given below of the performance of paging for a better understanding.  

Evaluating Expression for the performance of paging : Consider the TLB access time is ‘c’. And the TLB hit ratio is ‘x’ then the Evaluating Expression for the performance of paging is as follows.

Advantage: Reduces external fragmentation.

Advantages of paging:

  1. Memory Management: Paging provides a way for the operating system to manage the memory used by a process, ensuring that each process has enough memory to run effectively.
  2. Improved Memory Utilization: By dividing a process’s virtual memory into pages, paging allows the operating system to use memory more efficiently. Pages that are not currently in use can be swapped out to disk, allowing the system to use that memory for other processes.
  3. Improved Process Isolation: By separating a process’s virtual memory into pages, paging provides a degree of isolation between processes. This reduces the risk of a rogue process affecting the memory of other processes, leading to improved system stability.
  4. Reduced Memory Fragmentation: Paging helps to reduce memory fragmentation by allocating memory in fixed-sized pages, rather than as a continuous block.

Disadvantages: Suffers from Internal fragmentation. 

  1. Overhead: Paging introduces overhead in the form of additional data structures (e.g., page tables) and disk I/O operations required to swap pages in and out of memory.
  2. Internal Fragmentation: Because pages have a fixed size, there may be unused space within a page that is not usable by any other process. This is known as internal fragmentation.
  3. Page Faults: Paging can result in a large number of page faults, where the operating system needs to access the disk to retrieve a page that is not currently in memory. This can significantly slow down the performance of a system.
  4. Limited Address Space: The use of paging can limit the size of the virtual address space available to a process, as the virtual address space is divided into pages of a fixed size.
Effective Memory Access Time (E.M.A.T) with TLB
= x(c+m) + (1-x) (c + 2 m)
Article Tags :