What is Paging in OS?
Paging in OS is a dynamic and flexible technique that can load the processes in the memory partitions more optimally. The basic idea behind paging is to divide the process into pages so we can store these pages in the memory at different holes(partitions) and use these holes efficiently.
Define Paging in OS
The paging in OS is used to support non-contiguous memory allocation. Secondary memory will be divided into fixed-sized partitions of equal size, and each of these is called a page. Similarly, the main memory is divided into equal fixed-size partitions; each called a frame.
Download Formulas for GATE Computer Science Engineering - Databases
Address Translation in Paging in OS
The address translation in paging in OS is an address space that is the range of valid addresses available in a program or process memory. It is the memory space accessible to a program or process. The memory can be physical or virtual and is used for storing data and executing instructions. The two main types of address space are described below:
- Logical address space
- Physical address space
Paging in OS Diagram
The below diagram explains the technique of mapping a logical address to a physical address in paging in OS(operating system):
In the above diagram of the translation of logical to a physical address in paging in the operating system as the CPU generates a logical address containing the page number and offset. Then, corresponding to the page number, we check the frame number in which it is stored from the page table. The frame number is then added with the offset value to get the physical address, and then the memory is accessed with it.
Download Formulas for GATE Computer Science Engineering - Computer Networks
Characteristics of Paging in OS
The characteristics of the paging in OS(operating system) is that there is no external fragmentation by assuming the size of the main memory is in powers of 2. Processes can use all frames in the physical or main memory.
Paging in OS(operating system), the internal fragmentation may occur only on the last page of a process. The physical memory used by a process is no longer contiguous (non-contiguous). The logical memory of a process is still contiguous.
Important Points for Paging in Operating System (OS)
The hardware defines the page size in paging in OS. All the frames and pages in the memory are of the same size. Some of the important points for the paging in OS(operating system) are as follows:
- Whenever the process is created, paging in OS will be applied to the process, and a page table will be created. The base address of the page table will be stored in the PCB.
- Paging in OS is for every process, and every process will have its own page table.
- Page Table of the processes will be stored in the main memory.
- There is no external fragmentation in the paging in OS because the page size is the same as the frame size.
- The internal fragmentation exists on the last page, and internal fragmentation in the paging in OS is considered, where P is the page size.
- Maintaining the page table is considered an overhead (burden) for the system.
Important GATE Topics
|FDD Full Form||Resistors In Parallel|
|ISP Full Form||Resistors In Series|
|Stress And Strain||Properties Of Gases|
|IEEE Full Form||Environmental Studies Mcqs|
|Two Port Network||Fixed Beams|
Commentswrite a comment