Basic CS [TCS Placement]: Sample Questions 158 - 158 of 196

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 158

Edit

Describe in Detail

Essay▾

what are local and global page replacements?

Explanation

  • Local page replacement:
    • When a process incurs a page fault, a local page replacement algorithm selects for replacement some page that belongs to that same process
    • Local page replacement assumes some form of memory partitioning that determines how many pages are to be assigned to a given process or a group of processes.
    • Most popular forms of partitioning are fixed partitioning and balanced set algorithms based on the working set model.
    • The advantage of local page replacement is its scalability: each process can handle its page faults independently without contending for some shared global data structure.
    • There is the principal of locality where the pages are based on the most frequently used, least frequently used, or some other ‘prediction’ policies which imply that certain pages are more likely to be used than others.
    • Each process selects from only its own set of allocated frames
    • More consistent per process performance.
    • But possibly underutilized memory.
    • Only swap out current process pages.
    • Thrashing affects only current process.
    • Can use different page replacement algorithms for each process.
  • Global page replacement:
    • A global replacement algorithm is free to select any page in memory.
    • Global page replacement involves competition between processes as there are a limited number of frames.
    • This results in more page faults.
    • Process selects a replacement frame from the set of all frames, one process can take a frame from another
    • But then process execution time can vary greatly
    • But greater throughout so more common.
    • Swap out any page in memory.
    • No explicit allocation of page frames.
Given the Image is Define the Differences of Local and Global Page Replacements

Developed by: