frame allocation

Work in Progress

Summary

Local and global replacement

MethodCore IdeaAdvantagesDisadvantages
local replacementreplace with page in saem process- frames allocated to process is constant
- stable performace
- insufficient allocation -> hinder process
global replacementreplace any page- self-adjustment between processes- malicious processes can affect others
- different allocation between runs

Concept

  • how to allocated phycical memory frames across processes
  • simple approaches:
    • equal allocation
    • proportional allocation - by the size of the process in relation to all the processes

Local replacement

  • select victim page within the same process, using the process’s page table
  • pros:
    • frames allocated to a process remain constant -> stable performance between runs
  • cons:
    • less flexible, if insufficient frames are allocated -> process will be hindered

Global replacement

  • page replacement across processes
  • victim page can be chosen across all physical frames
  • pros:
    • self-adjustment, processes that need more can get more
  • cons:
    • malicious processes can get more frames
    • inconsistent frame allocation across runs

Thrasing with frame allocation

  • IO needed to bring data from secondary storage into RAM
  • with global replacement
    • thrashing process can steal pages from other processes
    • causing other processes to thrash also, cascading thrashing
  • with local replacement
    • limited to one process
    • but that process can block the IO

Working Set model

  • a locality, a region of code that accesses the same set of pages
  • transient - working set changing size
  • stable - working set is about the same for a period of time

represents back in time, we only have past info

  • working set window -> time interval
  • if is too small, may miss pages in currently locality
  • if is too big, may contain pages from another locality