Deck 11: Memory Management and Page Replacement Strategies in Operating Systems
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/35
Play
Full screen (f)
Deck 11: Memory Management and Page Replacement Strategies in Operating Systems
1
Virtual memory fetch strategies determine when a page or segment should be moved from ________ to ________.
A) main memory, the TLB
B) seconday storage, main memory
C) main memory, secondary storage
D) the TLB, registers
A) main memory, the TLB
B) seconday storage, main memory
C) main memory, secondary storage
D) the TLB, registers
B
2
Virtual memory replacement strategies determine ________.
A) when the system should update page or segment table entries
B) how many pages should be added to main memory
C) which pages should be brought into memory because a process is likely to reference them soon
D) which page or segment to remove to provide space for an incoming page or segment
A) when the system should update page or segment table entries
B) how many pages should be added to main memory
C) which pages should be brought into memory because a process is likely to reference them soon
D) which page or segment to remove to provide space for an incoming page or segment
D
3
Which of the following computer operations involves the highest degree of spatial locality?
A) a traversal of a tree data structure
B) a traversal of a linked-list data structure
C) a linear array traversal
D) a function used for calculating a factorial
A) a traversal of a tree data structure
B) a traversal of a linked-list data structure
C) a linear array traversal
D) a function used for calculating a factorial
C
4
According to temporal locality, processes are likely to reference pages that ________.
A) have been referenced recently
B) are located at address near recently referenced pages in memory
C) have been preloaded into memory
D) none of the above
A) have been referenced recently
B) are located at address near recently referenced pages in memory
C) have been preloaded into memory
D) none of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
5
Which of the following reasons makes demand paging a desirable fetch policy?
A) Demand paging improves performance for processes with predictable memory-access patterns.
B) Demand paging guarantees that the system brings into main memory only those pages that processes actually need.
C) Demand paging improves performance by preloading pages that are likely to be needed in the future.
D) all of the above
A) Demand paging improves performance for processes with predictable memory-access patterns.
B) Demand paging guarantees that the system brings into main memory only those pages that processes actually need.
C) Demand paging improves performance by preloading pages that are likely to be needed in the future.
D) all of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
6
Demand paging is disadvantageous because ________.
A) a process in a demand-paged system must accumulate pages one at a time
B) as a process references each new page, it must wait while the system transfers that page to main memory
C) system performance can suffer drastically if much of main memory is occupied by a process that cannot execute until new pages are fetched
D) all of the above
A) a process in a demand-paged system must accumulate pages one at a time
B) as a process references each new page, it must wait while the system transfers that page to main memory
C) system performance can suffer drastically if much of main memory is occupied by a process that cannot execute until new pages are fetched
D) all of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
7
________ is not important in determining the success of a prepaging strategy?
A) The number of pages that are preloaded at once
B) The type of data contained in preloaded pages
C) The amount of main memory allocated to prepaging
D) The heuristic that determines which pages are preloaded
A) The number of pages that are preloaded at once
B) The type of data contained in preloaded pages
C) The amount of main memory allocated to prepaging
D) The heuristic that determines which pages are preloaded
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
8
Anticipatory paging strategies that load a few of a process's contiguous pages when the process references a nonresident page exploit ________.
A) spatial locality
B) block allocation
C) the process's space-time product
D) temporal locality
A) spatial locality
B) block allocation
C) the process's space-time product
D) temporal locality
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
9
Page-replacement strategies typically attempt to ________ the number of page faults a process experiences as it runs from start to finish, hopefully ________ the process's execution time.
A) increase, increasing
B) increase, reducing
C) reduce, increasing
D) reduce, reducing
A) increase, increasing
B) increase, reducing
C) reduce, increasing
D) reduce, reducing
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following activities could lead to significant overhead in a page-replacement strategy?
A) asynchronously flushing modified pages to disk
B) marking pages as dirty or modified
C) predicting future page use to determine which pages to replace
D) all of the above
A) asynchronously flushing modified pages to disk
B) marking pages as dirty or modified
C) predicting future page use to determine which pages to replace
D) all of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
11
Under a random page replacement strategy, ________.
A) each page in main memory has a unique likelihood of being selected for replacement
B) there is generally a small probability that the page that is replaced will be referenced soon
C) the system is consistently likely to achieve high performance
D) all of the above
A) each page in main memory has a unique likelihood of being selected for replacement
B) there is generally a small probability that the page that is replaced will be referenced soon
C) the system is consistently likely to achieve high performance
D) all of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
12
A FIFO page-replacement strategy can be implemented with relatively low overhead using a ________.
A) queue
B) hash table
C) binary tree
D) stack
A) queue
B) hash table
C) binary tree
D) stack
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
13
Why is a FIFO page-replacement strategy impractical for most systems?
A) It replaces the page that has been in main memory the shortest amount of time.
B) It could lead to a decreased page-fault rate.
C) It could accidentally replace a heavily used page, such as one belonging to a text editor shared by several users.
D) The strategy's implementation incurs substantial overhead.
A) It replaces the page that has been in main memory the shortest amount of time.
B) It could lead to a decreased page-fault rate.
C) It could accidentally replace a heavily used page, such as one belonging to a text editor shared by several users.
D) The strategy's implementation incurs substantial overhead.
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
14
According to the FIFO Anomaly (also called Belady's Anomaly) certain page reference patterns cause ________ page faults when the number of page frames allocated to a process is ________.
A) more, increased
B) more, decreased
C) fewer, increased
D) fewer, decreased
A) more, increased
B) more, decreased
C) fewer, increased
D) fewer, decreased
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
15
The least-recently-used (LRU) page-replacement strategy ________.
A) can incur substantial overhead
B) always performs better than FIFO
C) relies on spatial locality as a heuristic for determining which pages to replace in main memory
D) all of the above
A) can incur substantial overhead
B) always performs better than FIFO
C) relies on spatial locality as a heuristic for determining which pages to replace in main memory
D) all of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
16
LRU replaces the page that has spent the ________.
A) longest time in memory
B) longest time in memory without being referenced
C) shortest time in memory
D) shortest time in memory without being referenced
A) longest time in memory
B) longest time in memory without being referenced
C) shortest time in memory
D) shortest time in memory without being referenced
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
17
The least-frequently-used (LFU) page-replacement strategy can be implemented using ________.
A) a queue of pages in main memory
B) a stack of pages in main memory
C) a counter for each page in main memory
D) none of the above
A) a queue of pages in main memory
B) a stack of pages in main memory
C) a counter for each page in main memory
D) none of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
18
Under a not-used-recently (NUR) page-replacement strategy, the best page to replace (if available) is one that has ________.
A) been referenced but not modified
B) been both referenced and modified
C) not been referenced but has been modified
D) been neither referenced nor modified
A) been referenced but not modified
B) been both referenced and modified
C) not been referenced but has been modified
D) been neither referenced nor modified
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
19
NUR is based on the idea that ________.
A) a page that has not been recently used is likely to be used in the near future
B) a page that has not been recently used is not likely to be used in the near future
C) a page that has been recently used is not likely to be used in the near future
D) none of the above
A) a page that has not been recently used is likely to be used in the near future
B) a page that has not been recently used is not likely to be used in the near future
C) a page that has been recently used is not likely to be used in the near future
D) none of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
20
The second-chance page-replacement strategy ________.
A) moves pages found at the head of a FIFO queue with the referenced bit turned on back to the tail of the queue to avoid replacing them
B) searches through a circular list of pages and replaces the first page it encounters that has the referenced bit turned off
C) relies on a modified bit to determine which page to replace
D) none of the above
A) moves pages found at the head of a FIFO queue with the referenced bit turned on back to the tail of the queue to avoid replacing them
B) searches through a circular list of pages and replaces the first page it encounters that has the referenced bit turned off
C) relies on a modified bit to determine which page to replace
D) none of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
21
The far page-replacement strategy utilizes an ________ that characterizes a process's reference patterns.
A) access list
B) access table
C) access graph
D) access vector
A) access list
B) access table
C) access graph
D) access vector
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
22
Why has the far page-replacement strategy not been implemented in real systems?
A) It is impossible to determine a particular process's reference patterns.
B) The execution-time overhead it requires is too great.
C) It has been shown mathematically to perform at far below optimal levels.
D) all of the above
A) It is impossible to determine a particular process's reference patterns.
B) The execution-time overhead it requires is too great.
C) It has been shown mathematically to perform at far below optimal levels.
D) all of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
23
Thrashing is the term used to describe ________.
A) excessive paging activity causing low processor utilization
B) what occurs when a disk receives many I/O requests
C) what occurs when a process references nonsequential pages in its address space
D) an unstable system
A) excessive paging activity causing low processor utilization
B) what occurs when a disk receives many I/O requests
C) what occurs when a process references nonsequential pages in its address space
D) an unstable system
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
24
Which of the following statements about working set memory management is false?
A) The "true" working set of a process is the set of pages that must reside in main memory for the process to execute efficiently.
B) Working sets are static once a process begins executing.
C) A process's next working set may differ substantially from its current one.
D) none of the above
A) The "true" working set of a process is the set of pages that must reside in main memory for the process to execute efficiently.
B) Working sets are static once a process begins executing.
C) A process's next working set may differ substantially from its current one.
D) none of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
25
The page-fault-frequency (PFF) strategy adjusts the process's resident page set ________.
A) only after each page fault
B) after each memory reference
C) after each time a page is flushed
D) after a process is preempted
A) only after each page fault
B) after each memory reference
C) after each time a page is flushed
D) after a process is preempted
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
26
Under the PFF strategy, those pages that belong to a particular process and are currently in memory are referred to as the process's ________.
A) "true" working set
B) active page set
C) running page set
D) resident page set
A) "true" working set
B) active page set
C) running page set
D) resident page set
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
27
________ is a technique that can improve working set page replacement by removing pages from memory a process is no longer using.
A) Anticipatory page replacement
B) Voluntary page release
C) Asynchronous page flushing
D) none of the above
A) Anticipatory page replacement
B) Voluntary page release
C) Asynchronous page flushing
D) none of the above
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following statements about page sizes is false?
A) A large page size reduces the range of memory that the TLB can reference with each entry.
B) A smaller page size would help a process establish a smaller, tighter working set, leaving more memory available to other processes.
C) Large page sizes reduce page table fragmentation by decreasing the number of page table entries.
D) A system transferring information from main memory to secondary storage using a small page size may require several separate I/O operations, which could increase a process's space-time product.
A) A large page size reduces the range of memory that the TLB can reference with each entry.
B) A smaller page size would help a process establish a smaller, tighter working set, leaving more memory available to other processes.
C) Large page sizes reduce page table fragmentation by decreasing the number of page table entries.
D) A system transferring information from main memory to secondary storage using a small page size may require several separate I/O operations, which could increase a process's space-time product.
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
29
In today's systems, what is the "industry-standard" page size?
A) 4KB
B) 4MB
C) 8KB
D) There is no "industry-standard" page size.
A) 4KB
B) 4MB
C) 8KB
D) There is no "industry-standard" page size.
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
30
In a system containing several concurrent processes, a running process with a small working set tends to experience a ________ number of page faults as the page size ________.
A) greater, increases
B) greater, decreases
C) constant, increases
D) constant, decreases
A) greater, increases
B) greater, decreases
C) constant, increases
D) constant, decreases
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
31
The average interfault time ________ as the number of page frames allocated to a process ________.
A) increases, increases
B) increases, decreases
C) remains constant, increases
D) remains constant, decreases
A) increases, increases
B) increases, decreases
C) remains constant, increases
D) remains constant, decreases
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
32
The global LRU (gLRU) page-replacement strategy replaces the least-recently-used page in ________.
A) the least-recently-executed process
B) the lowest-priority process
C) the entire system
D) the currently executing process
A) the least-recently-executed process
B) the lowest-priority process
C) the entire system
D) the currently executing process
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
33
Under the SEQ global replacement strategy, when looping behavior is detected, the _________ strategy is employed.
A) least-recently-used (LRU)
B) most-recently-used (MRU)
C) not-used-recently (NUR)
D) first-in-first-out (FIFO)
A) least-recently-used (LRU)
B) most-recently-used (MRU)
C) not-used-recently (NUR)
D) first-in-first-out (FIFO)
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
34
Linux uses a variation of the ________ algorithm to approximate an ________ page-replacement strategy.
A) NUR, LRU
B) NUR, LFU
C) clock, LRU
D) clock, LFU
A) NUR, LRU
B) NUR, LFU
C) clock, LRU
D) clock, LFU
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck
35
Which one of the following statements about Linux's page-replacement strategy is false?
A) A page in the inactive list will remain in memory until it is selected for replacement.
B) A page in the active list cannot be selected for replacement.
C) The most-recently-used pages are near the head of the active list.
D) If a page has been referenced more than once recently, the page is placed in the inactive list.
A) A page in the inactive list will remain in memory until it is selected for replacement.
B) A page in the active list cannot be selected for replacement.
C) The most-recently-used pages are near the head of the active list.
D) If a page has been referenced more than once recently, the page is placed in the inactive list.
Unlock Deck
Unlock for access to all 35 flashcards in this deck.
Unlock Deck
k this deck