UCS1411-Lab 9 Implementation of Paging Technique Solved
Aim:
To develop a C program to implement the paging technique in memory management.
Procedure:
1. Get the total size of the physical memory and the page size.
2. Divide the physical memory into frames.
3. Initialize the physical memory structure using random number generation (Some frames must be free and some random frames are already allotted to other process)
4. Construct the free frame list.
5. Get the Process memory requirement. Divide the LAS into n pages.
6. If n free frames are available, allot the process and update the page table.
7. Show the conversion of any logical address into the corresponding physical address.
8. Do de-allocation accordingly.
9. Repeat the steps 5-8 for N processes.
SAMPLE INPUT/OUTPUT:
Paging Technique
Enter the physical memory size: 32 KB
Enter the page size = 1 KB
Physical memory is divided into 32 frames.
After initialization
Free Frames: 3 6 9 12 1 2 18 30 25
1. Process request
2. Deallocation
3. Page Table display for all input process
4. Free Frame list display
5. Exit
Enter the option:1 Enter the Process requirement(ID,size): P1, 4 KB