PAGING IN OPERATING SYSTEM | PAGED MEMORY MANAGEMENT
Paging is a memory management scheme which allows the physical address space of a process can be noncontiguous;. Here the process is allocated physical memory whenever the memory is available. Thus it avoids external fragmentation and avoids problem of fitting varying sized memory chunks onto backing store. Here,We divide physical memory into fixed-sized blocks called frames and divide logical memory into blocks of same size called pages. Size of a page is usually a power of 2, between 512 bytes and 16 MB To run a program of size N pages, OS need to find N free frames and load program. To find the frame number where a page is located,the OS sets up a page table to translate logical to physical addresses. In address translation the address generated by CPU is divided into: Page number (p) – used as an index into a page table which contains base address of each page in physical memory Page offset (d) – combined with base address to define the physical memory address that is sent to the memory unit. If the size of a logical address space is 2m and page size is 2n, then logical address is as follows: p followed by d In paging,we have no external fragmentation, any frame can be allocated to any process that needs it.But we have internal fragmentation. Eg: Calculating internal fragmentation If Page size = 2,048 bytes Process size = 70000 bytes 34 pages + 368 bytes Internal fragmentation of 2,048 - 368 = 1680 bytes wasted due to internal fragmentation. Page table is kept in main memory Can be implemented with pagetable is small(Eg: DEC PDP 11 architecture- pagesize is 8KB) Page-table base register (PTBR) is maintained and it points to the page table.In this scheme every data/instruction access requires two memory accesses. One for the page table and one for accessing the data / instruction. Since Page table resides in memory, it consumes additional memory. Each page table lookup operation also takes longer memory access time. This problem created by using page table to find the frame number of a particular page, can be solved by the use of a special fast-lookup hardware cache called associative memory or translation look-aside buffers (TLBs). If you found the Videos useful,Please do not forget to Like,Comment and SUBSCRIBE THE CHANNEL for more such Videos. Stay Connected ... Other Useful Playlist Links: Process Synchronization: https://www.youtube.com/playlist?list=PLCgLCvfziuGabr6GKKKoAapO8M-EPKDpE Deadlocks: https://www.youtube.com/playlist?list=PLCgLCvfziuGbtqWnJHnfovTrPf7zcsLfA Memory Management in Operating Systems: https://www.youtube.com/playlist?list=PLCgLCvfziuGYRMLnswVQHUQi4lForH6xy Case Studies in The Linux System https://www.youtube.com/playlist?list=PLCgLCvfziuGZk4_Zyd5RmEmHyTgGW8tSK File System-Protection : https://www.youtube.com/playlist?list=PLCgLCvfziuGbOdmayFwWh0DmcJ5VqrQ42 Secondary Storage Structures: https://www.youtube.com/playlist?list=PLCgLCvfziuGZpUsVA1IvrWjQp_D0PauIu File System implementation: https://www.youtube.com/playlist?list=PLCgLCvfziuGYld24Xux9PDeDRqDcvTz62 File System: https://www.youtube.com/playlist?list=PLCgLCvfziuGajsMMoKevg8ZwHpjanXTrY #GAteComputerScience #NETComputerScience #oslectures #operatingsystems #CSE #VTU #Exam #AnnaUniversitySyllabus THANKS FOR WATCHING :)
Download
0 formatsNo download links available.