Memory Allocation (11) Flashcards
Goal of page frame allocation
ensure that each process that is scheduled to execute has minimum number of frames allocated so that enough of its pages can be loaded into main mem and that the process can run
local replacement
each process selects replacement frames from only its own set of allocated frames
global replacement
process selects replacement frame from the set of all frames
Advantage of global page replacement
page frames are dynamically allocated among processes - number of page frames assigned to a process can vary - more effficient
issue with global replacement
large computationally expensive programs can be assigned too many frames and can monopolize memory usage
Disadvantage of local replacement
under utilization of memory - some processes have lower mem demands but their frames are inaccessible to other programs that may have better use for them (computationally larger programs).
relationship between memory references between page faults and number of frames allocated
more allocated frames = more memory references between page faults = fewer page faults
Free frames list
pool of free frames for when a desired page is brought from secondary storage to main mem (when a page fault occurs). List of free frames in memory
When OS starts up all available memory is usually placed in free frames list
What happens to the free frames list that triggers page replacement
Page replacement is triggered when free frames list falls below a certain threshold
How does the free frames list operate
connecting unallocated regions in memory together in a linked list, using the first word of each unallocated frame as a pointer to the next frame
Equal page frame allocation
each process receives equal share of frames from free frame list
No one process can monopolize
Proportional page frame allocation
assigns number of page frames proportional to the size (required number of pages) for each process.
Ensures that larger programs dont run too slowly
Priority allocation
all frames are assigned a priority number. The frame with the lowest priority is the one that is selected to have its residing page swapped out of main memory so that another process’ page can be swapped in
Main issue with priority allocation
each page needs to have priority number - best assignment of priorities can be an issue
What is the PFF (Page Fault Frequency)
another way to handle the allocation of main mem frames between processes
Used with local page replacement and works via monitoring the PFF of each process
Method of reducing page faults by dynamically changing the number of frames assigned per process.