- The Technique of mapping cpu generated logical address to physical address is called as paging
- Paging is implemented in the hardware level.
- Paging is a memory management scheme that eliminates the need for Contigous allocation of physical memory
- It permits the physical address space of a process to be non contigous.
- Paging is simple paging and multilevel paging
- Logical address space (L.A.S)or virtual address space (V.A.S) is represented in the form of words or bytes . Ex 512kB or 512W
- Logical Address (LA) or virtual Address(VA) is represented in the form of bits .Ex19bits
- Physical address space (P.A.S) is represented in the form of words or bytes .Ex 32kW or 32kB
- Physical address (P.A) is represented in the form of bits .Ex 17bits
- L.A.S is divided in to equal size pages
6.P.A.S is divided in to equal size frames
7. Page size =Frame size(always)
8.some of the pages of L.A.S is brought in to the P.A.S
9.Page table =Tanslation Table and Frame number =Translation Bits
10.P=No.of bits required to represents pages of L.A.S or page number
11.No. of Bits required to represents Page size or word number of the page or Page offset
12.F=No. of bits required to represent the frames of P.A.S or frame Number.
13.No. of bits required to represent the frame size or word number of the frame
or frame offset
Page table overview
Important points for paging
- Whenever the process is created ,paging will be applied on the process and page table will be created and base address of the page table will be stored in PCB(process control block).
- Paging with respect to every process and every process will have its own page table .
- Page table of processes will be stored in the main memory.
- There is no external fragmentation in the paging .
- the internal fragmentation in the last page and internal fragmentation is considered as (P/2),where 'P' is page size
- Maintaining the page table is considered as overhead for the system
Note :windows follows the page size of 4KB.
Note :The page table entry definitly contains frame number but some times along with the frame number it may contains additional bits .
Valid/Invalid or present /absent bit: This bit is used to identify whether the page is available or not in main memory.
'0' indicates page not present in M.M
'1' indicates page present in M.M
Dirty bit or modified bit: This bit is used to identify whether the page is modified or not
'0' not modified
Reference bit: This bit is used to identified that how many times the page is reffered while execution
Page protection or permission bits: This bits are used for protection and security from the unauthorised access
Caching : This bit is used to enables or disable caching of the page .
Q. Consider a system with logical address=32 bits and physical address space=4KB and memory is byte addressable. Then what is the approx size of page table in Bytes?
Logical address = 32 bits
Page size = 4KB, so page is recognized with 12 bits
no. of pages = 2logical address / page size
= 232 /212
page size = frame size
Physical address space = 64MB, so it is recognized with 26bits
no. of frames = physical address space / page size
=214 frames, so it is recognized with 14 bits
Page table size = no. of pages * no. of bits required to recognize a frame
= (220 * 14) , in bits
= (220 * 14) /8 , in Bytes