PAGING

What do you mean by Paging?
  • OS performs an operation for storing and retrieving data from secondary storage devices for use in main memory. 
  • Paging is a memory management technique in which the memory is divided into fixed size pages.
  • Paging is used for faster access to data.
  • When a program needs a page, it is available in the main memory as the OS copies a certain number of pages from your storage device to main memory.
  • Data is retrieved from storage media by OS, in the same sized blocks called as pages. 
  • Paging allows the physical address space of the process to be non contiguous. 
  • The whole program had to fit into storage contiguously.
  • Paging is to deal with external fragmentation problem. 
  • This is to allow the logical address space of a process to be non contiguous, which makes the process to be allocated physical memory.
Advantages of Paging:
  • Flexibility- with a fully-developed paging approach, the system will be able to support the abstraction of an address space effectively, regardless of how a process uses the address space; we won’t, for example, make assumptions about the direction the heap and stack grow and how they are used.
  • Simplicity- simplicity of free-space management that paging affords. For example, when the OS wishes to place our tiny 64-byte address space into our eight-page physical memory, it simply finds four free pages; perhaps the OS keeps a free list of all free pages for this, and just grabs the first four free pages off of this list.
  • Memory protection ( malicious tasks can't harm each other or the kernel)
  • Shared memory between tasks (a fast type of IPC, also conserves memory when used for DLLs)
  • Demand loading (prevents big load on CPU when a task first starts running, conserves memory)
  • Memory mapped files
  • Virtual memory swapping (lets system degrade gracefully when memory required exceeds RAM size)
  • paging eliminates fragmentation
  • Support higher degree of multi programming
  • Paging increases memory and processor utilization
  • Compaction overhead required or the relocatable partition scheme is also eliminated
Disadvantages Of Paging

  • Page address mapping hardware usually increases the cost of the computer.
  • Memory must be used to store the various tables like page table,memory map table..
  • Some memory will still be unused if te number of available block is not sufficient for the address spaces of the jobs to be run.


No comments:

Post a Comment