Deck 10: Virtual Memory

Full screen (f)
exit full mode
Question
Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and a system with three page frames, what is the final configuration of the three frames after the LRU algorithm is applied?

A) 1, 3, 4
B) 3, 1, 4
C) 4, 1, 2
D) 1, 2, 3
Use Space or
up arrow
down arrow
to flip the card.
Question
The most preferred method of swapping a process is

A) to swap using the file system.
B) to copy an entire file to swap space at process startup and then perform demand paging from the swap space.
C) to demand-page from the file system initially but to write the pages to swap space as they are replaced.
D) None of the above.
Question
_____ is the algorithm implemented on most systems.

A) FIFO
B) Least frequently used
C) Most frequently used
D) LRU
Question
The Second-Chance algorithm

A) is same as FIFO algorithm if all pages in memory have been referenced at least once since the last page fault.
B) is same as FIFO algorithm if none of the pages in memory have been referenced since the last page fault.
C) is same as LRU algorithm if all pages in memory have been referenced at least once since the last page fault.
D) is same as LRU algorithm if none of the pages in memory have been referenced since the last page fault.
Question
The dirty (modify) bit identifies

A) a page that has been corrupted.
B) a page that needs to be reloaded when accessed.
C) a page that is shared by multiple processes.
D) a page that has been modified since it was loaded.
Question
Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 3 and a system with three page frames, what is the final configuration of the three frames after the OPT algorithm is applied?

A) 1, 3, 4
B) 1, 2, 3
C) 2, 3, 4
D) 1, 2, 1
Question
In demand paging,

A) a page loaded in memory may never be accessed.
B) all pages that a program will access during execution are loaded in memory in the beginning.
C) a page is loaded in memory only when it is needed during execution.
D) a page is loaded in memory just before it is needed.
Question
If an instruction modifies several different locations, a page fault can be handled by

A) using temporary registers to hold the values of overwritten locations.
B) loading multiple pages in advance.
C) incorporating special hardware.
D) terminating the process.
Question
A drawback of equal or proportional allocation is that

A) they are very expensive to compute.
B) the processes that arrive earlier get more pages than the processes arriving later.
C) the allocation varies according to the degree of multiprogramming.
D) a high-priority process is treated the same as a low-priority process.
Question
Counting based page replacement algorithms are not commonly used, because

A) they only approximate LRU.
B) they are expensive to implement, even though they incur the least number of page faults.
C)they do not approximate OPT replacement very well and their implementation is expensive.
D) they do not approximate OPT replacement very well, even though they are easy to implement.
Question
Optimal page replacement ____.

A) is the page-replacement algorithm most often implemented
B) is used mostly for comparison with other page-replacement schemes
C) can suffer from Belady's anomaly
D) requires that the system keep track of previously used pages
Question
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string?

A) 14
B) 8
C) 13
D) 10
Question
In Additional-Reference-Bits algorithm,

A) the least-recently used page is identified very efficiently on a page fault.
B) a group of pages that have not been used recently are efficiently identified.
C) a page that has been referenced most recently is identified.
D) None of the above.
Question
If an architecture has a move instruction with more than one word and at most one of the two operands may be an indirect memory reference, the minimum number of frames needed to run a process on this architecture is

A) 3
B) 4
C) 5
D) 6
Question
Stack algorithms are a class of page replacement algorithms that

A) are implemented using stacks.
B) are guaranteed to incur the least number of page faults.
C) do not suffer from Belady's anomaly.
D) are guaranteed to incur no more page faults than FIFO page replacement algorithm.
Question
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string?

A) 4, 1, 3
B) 3, 1, 4
C) 4, 2, 3
D) 3, 4, 2
Question
Which of the following is FALSE about reapers?

A) They may swap out a page from a process even when that process is not running.
B) They may use any page replacement algorithm to swap out pages.
C) They may swap out pages event when there are ample free frames available.
D) They implement a global page replacement policy.
Question
A free-frame list

A) is a set of all frames that are filled with all zeros.
B) is a set of all frames that are currently unallocated to any process.
C) is a set of all frames that are currently being shared by at least two processes.
D) is a set of all frames that are used for stack and heap memory.
Question
An advantage of virtual memory is that

A) a program can be much larger than the size of physical memory.
B) the programmers can concentrate programming the problem instead of worrying about the amount of physical memory available.
C) it provides a way to execute a program that is only partially loaded in memory.
D) All of the above.
Question
Anonymous memory of a process refers to

A) the pages not associated with the binary executable file of the process.
B) the pages associated with the binary executable file of the process.
C) the pages associated with the static data of the process.
D) the pages that cannot be swapped out of the physical memory.
Question
Explain the usefulness of a modify bit.
Question
Explain how copy-on-write operates.
Question
Which of the following is true about the strategy that uses page fault frequency (PFF) to prevent thrashing?

A) A new page is allocated to a process if PFF is too high.
B) A page is deallocated from a process if the PFF is too low.
C) A new process may be swapped in if PFF is too low.
D) All of the above.
Question
How is the effective access time computed for a demand-paged memory system?
Question
Which of the following is true about choosing an appropriate page size?

A) Larger page size results in reducing total I/O.
B) Smaller page size reduces the number of page faults.
C) Larger page size reduces I/O time.
D) Larger page size results in less total allocated memory.
Question
Explain the concept behind prepaging.
Question
Explain the distinction between a demand-paging system and a paging system with swapping.
Question
Memory compression is a useful alternative to paging

A) when the system has slow magnetic disks but not faster SSDs.
B) when the compression algorithm is can achieve the best possible compression ratio.
C) when the speed of the compression algorithm fastest.
D) even when the system has faster SSDs.
Question
What are the benefits of using slab allocation to allocate kernel memory?
Question
In which of the following cases, performance may be improved?

A) Designing array access pattern based on whether the arrays are stored in row major or column major order.
B) Placing frequently interacting components close to one another.
C) Avoid placing functions across page boundaries.
D) All of the above.
Question
Why doesn't a local replacement algorithm solve the problem of thrashing entirely?
Question
A sign of thrashing is

A) the CPU utilization increases as the degree of multiprogramming is increased.
B) the CPU utilization decreases as the degree of multiprogramming is increased.
C) the CPU utilization increases as the number of pages allocated to each process is increased.
D) the CPU utilization decreases as the number of pages allocated to each process is increased.
Question
Explain the sequence of events that happens when a page-fault occurs.
Question
Explain the distinction between global allocation versus local allocation.
Question
Lock bit is NOT used for which of the following cases:

A) the page that is being used for I/O.
B) some OS pages.
C) a new page that has just been brought in.
D) a page that belongs to a high priority process.
Question
Which of the following does not increase the TLB reach?

A) Increase the size of TLB.
B) Increase page size.
C) Decrease the size working set.
D) Provide multiple page sizes.
Question
How does the second-chance algorithm for page replacement differ from the FIFO page replacement algorithm?
Question
The working set strategy

A) swaps out a process if OS cannot allocate enough pages to accommodate its working set.
B) swaps in a new process if there is enough memory available to accommodate its working set.
C) keeps the degree of multiprogramming as high as possible while preventing thrashing.
D) All of the above.
Question
What is the benefit of using sparse addresses in virtual memory?
Question
Discuss two strategies for increasing TLB reach.
Question
The instruction that causes a page fault needs to be re-executed after the fault has been handled.
Question
A reaper starts reclaiming pages as soon as the number of free frames falls below the maximum threshold.
Question
Stack algorithms can never exhibit Belady's anomaly.
Question
Explain how working set model works.
Question
A page fault must be preceded by a TLB miss.
Question
How are lock bits useful in I/O requests?
Question
Prepaging an executable program is much easier than prepaging a text file.
Question
Solaris uses both a local and global page replacement policy.
Question
The current best practice to avoid thrashing is to include enough physical memory.
Question
Some operating systems keep a pool of free frames so that the frequency of page faults is lowered.
Question
Some operating systems provide raw disk, so that special applications can bypass file system when accessing secondary storage.
Question
Windows uses both a local and global page replacement policy.
Question
The buddy system for allocating kernel memory is very likely to cause fragmentation within the allocated segments.
Question
In Linux, a slab may only be either full or empty.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/54
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 10: Virtual Memory
1
Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and a system with three page frames, what is the final configuration of the three frames after the LRU algorithm is applied?

A) 1, 3, 4
B) 3, 1, 4
C) 4, 1, 2
D) 1, 2, 3
B
2
The most preferred method of swapping a process is

A) to swap using the file system.
B) to copy an entire file to swap space at process startup and then perform demand paging from the swap space.
C) to demand-page from the file system initially but to write the pages to swap space as they are replaced.
D) None of the above.
C
3
_____ is the algorithm implemented on most systems.

A) FIFO
B) Least frequently used
C) Most frequently used
D) LRU
D
4
The Second-Chance algorithm

A) is same as FIFO algorithm if all pages in memory have been referenced at least once since the last page fault.
B) is same as FIFO algorithm if none of the pages in memory have been referenced since the last page fault.
C) is same as LRU algorithm if all pages in memory have been referenced at least once since the last page fault.
D) is same as LRU algorithm if none of the pages in memory have been referenced since the last page fault.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
5
The dirty (modify) bit identifies

A) a page that has been corrupted.
B) a page that needs to be reloaded when accessed.
C) a page that is shared by multiple processes.
D) a page that has been modified since it was loaded.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
6
Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 3 and a system with three page frames, what is the final configuration of the three frames after the OPT algorithm is applied?

A) 1, 3, 4
B) 1, 2, 3
C) 2, 3, 4
D) 1, 2, 1
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
7
In demand paging,

A) a page loaded in memory may never be accessed.
B) all pages that a program will access during execution are loaded in memory in the beginning.
C) a page is loaded in memory only when it is needed during execution.
D) a page is loaded in memory just before it is needed.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
8
If an instruction modifies several different locations, a page fault can be handled by

A) using temporary registers to hold the values of overwritten locations.
B) loading multiple pages in advance.
C) incorporating special hardware.
D) terminating the process.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
9
A drawback of equal or proportional allocation is that

A) they are very expensive to compute.
B) the processes that arrive earlier get more pages than the processes arriving later.
C) the allocation varies according to the degree of multiprogramming.
D) a high-priority process is treated the same as a low-priority process.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
10
Counting based page replacement algorithms are not commonly used, because

A) they only approximate LRU.
B) they are expensive to implement, even though they incur the least number of page faults.
C)they do not approximate OPT replacement very well and their implementation is expensive.
D) they do not approximate OPT replacement very well, even though they are easy to implement.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
11
Optimal page replacement ____.

A) is the page-replacement algorithm most often implemented
B) is used mostly for comparison with other page-replacement schemes
C) can suffer from Belady's anomaly
D) requires that the system keep track of previously used pages
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
12
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string?

A) 14
B) 8
C) 13
D) 10
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
13
In Additional-Reference-Bits algorithm,

A) the least-recently used page is identified very efficiently on a page fault.
B) a group of pages that have not been used recently are efficiently identified.
C) a page that has been referenced most recently is identified.
D) None of the above.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
14
If an architecture has a move instruction with more than one word and at most one of the two operands may be an indirect memory reference, the minimum number of frames needed to run a process on this architecture is

A) 3
B) 4
C) 5
D) 6
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
15
Stack algorithms are a class of page replacement algorithms that

A) are implemented using stacks.
B) are guaranteed to incur the least number of page faults.
C) do not suffer from Belady's anomaly.
D) are guaranteed to incur no more page faults than FIFO page replacement algorithm.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
16
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string?

A) 4, 1, 3
B) 3, 1, 4
C) 4, 2, 3
D) 3, 4, 2
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
17
Which of the following is FALSE about reapers?

A) They may swap out a page from a process even when that process is not running.
B) They may use any page replacement algorithm to swap out pages.
C) They may swap out pages event when there are ample free frames available.
D) They implement a global page replacement policy.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
18
A free-frame list

A) is a set of all frames that are filled with all zeros.
B) is a set of all frames that are currently unallocated to any process.
C) is a set of all frames that are currently being shared by at least two processes.
D) is a set of all frames that are used for stack and heap memory.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
19
An advantage of virtual memory is that

A) a program can be much larger than the size of physical memory.
B) the programmers can concentrate programming the problem instead of worrying about the amount of physical memory available.
C) it provides a way to execute a program that is only partially loaded in memory.
D) All of the above.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
20
Anonymous memory of a process refers to

A) the pages not associated with the binary executable file of the process.
B) the pages associated with the binary executable file of the process.
C) the pages associated with the static data of the process.
D) the pages that cannot be swapped out of the physical memory.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
21
Explain the usefulness of a modify bit.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
22
Explain how copy-on-write operates.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
23
Which of the following is true about the strategy that uses page fault frequency (PFF) to prevent thrashing?

A) A new page is allocated to a process if PFF is too high.
B) A page is deallocated from a process if the PFF is too low.
C) A new process may be swapped in if PFF is too low.
D) All of the above.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
24
How is the effective access time computed for a demand-paged memory system?
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
25
Which of the following is true about choosing an appropriate page size?

A) Larger page size results in reducing total I/O.
B) Smaller page size reduces the number of page faults.
C) Larger page size reduces I/O time.
D) Larger page size results in less total allocated memory.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
26
Explain the concept behind prepaging.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
27
Explain the distinction between a demand-paging system and a paging system with swapping.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
28
Memory compression is a useful alternative to paging

A) when the system has slow magnetic disks but not faster SSDs.
B) when the compression algorithm is can achieve the best possible compression ratio.
C) when the speed of the compression algorithm fastest.
D) even when the system has faster SSDs.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
29
What are the benefits of using slab allocation to allocate kernel memory?
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
30
In which of the following cases, performance may be improved?

A) Designing array access pattern based on whether the arrays are stored in row major or column major order.
B) Placing frequently interacting components close to one another.
C) Avoid placing functions across page boundaries.
D) All of the above.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
31
Why doesn't a local replacement algorithm solve the problem of thrashing entirely?
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
32
A sign of thrashing is

A) the CPU utilization increases as the degree of multiprogramming is increased.
B) the CPU utilization decreases as the degree of multiprogramming is increased.
C) the CPU utilization increases as the number of pages allocated to each process is increased.
D) the CPU utilization decreases as the number of pages allocated to each process is increased.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
33
Explain the sequence of events that happens when a page-fault occurs.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
34
Explain the distinction between global allocation versus local allocation.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
35
Lock bit is NOT used for which of the following cases:

A) the page that is being used for I/O.
B) some OS pages.
C) a new page that has just been brought in.
D) a page that belongs to a high priority process.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
36
Which of the following does not increase the TLB reach?

A) Increase the size of TLB.
B) Increase page size.
C) Decrease the size working set.
D) Provide multiple page sizes.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
37
How does the second-chance algorithm for page replacement differ from the FIFO page replacement algorithm?
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
38
The working set strategy

A) swaps out a process if OS cannot allocate enough pages to accommodate its working set.
B) swaps in a new process if there is enough memory available to accommodate its working set.
C) keeps the degree of multiprogramming as high as possible while preventing thrashing.
D) All of the above.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
39
What is the benefit of using sparse addresses in virtual memory?
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
40
Discuss two strategies for increasing TLB reach.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
41
The instruction that causes a page fault needs to be re-executed after the fault has been handled.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
42
A reaper starts reclaiming pages as soon as the number of free frames falls below the maximum threshold.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
43
Stack algorithms can never exhibit Belady's anomaly.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
44
Explain how working set model works.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
45
A page fault must be preceded by a TLB miss.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
46
How are lock bits useful in I/O requests?
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
47
Prepaging an executable program is much easier than prepaging a text file.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
48
Solaris uses both a local and global page replacement policy.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
49
The current best practice to avoid thrashing is to include enough physical memory.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
50
Some operating systems keep a pool of free frames so that the frequency of page faults is lowered.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
51
Some operating systems provide raw disk, so that special applications can bypass file system when accessing secondary storage.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
52
Windows uses both a local and global page replacement policy.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
53
The buddy system for allocating kernel memory is very likely to cause fragmentation within the allocated segments.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
54
In Linux, a slab may only be either full or empty.
Unlock Deck
Unlock for access to all 54 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 54 flashcards in this deck.