Lecture 3 Flashcards
When do ALL algorithms perform badly?
When processes have insufficient physical memory.
When do algorithms approach optimal task performance?
As physical memory allocated to processes approaches virtual memory size.
Load-control strategies
To decide how many processes
(and pages per process) must concurrently share memory.
What is the goal of any page frame allocation?
Ensure that each process scheduled to execute has a minimum number of page frames allocated, in order that enough of its pages can be loaded into memory and that the process can run.
Global Replacement
The process selects replacement frame from the set of all frames,
i.e., one process can take a frame from another process.
Local Replacement
Each process selects replacement frames from only its own set of allocated frames.
Advantage of global-page replacement
Global-page replacement algorithms are more efficient in memory allocation because page frames are dynamically allocated among processes.
One disadvantage of global-page replacement
Large computationally expensive processes
can be assigned too many memory frames.
One Disadvantage of local page replacement
Processes are allocated a fixed fraction of the page frames. However, some processes may have slightly lower memory demands and other processes slightly
higher memory demands.
Which page replacement algorithm (between local and global is generally preferred)?
Global page-replacement algorithms generally work better.
Increase in memory frame allocation per process and the relationship between page faults.
More memory frames allocated per process, less page faults.
Few memory frames allocated per process, more page faults.
What is the relationship between memory references (accesses) and page faults.
When we have more page faults there is less time for memory references, since most of the time is spent handling faults and not doing memory access.
Free frame list
OS maintains a list of free memory frames in main memory.
What happens when the number of free frames in the list falls below the threshold?
Page replacement occurs so that OS always has some free memory frames to assign to newly scheduled processes or processes with increasing memory demands.
When is all of the main memory on the free frame list?
When the OS starts up.