Verified Test Bank Virtual Memory Ch.10 - Operating System Concepts 10e Complete Test Bank by Abraham Silberschatz. DOCX document preview.
Chapter 10
Multiple Choice Questions
1. 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.
Feedback: 10.2
Difficulty: Easy
2. 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.
Feedback: 10.1
Difficulty: Easy
3. 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.
Feedback: 10.2.1
Difficulty: Easy
4. 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.
Feedback: 10.2.2
Difficulty: Easy
5. 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.
Feedback: 10.2.3
Difficulty: Medium
6. 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.
Feedback: 10.2.3
Difficulty: Medium
7. _____ is the algorithm implemented on most systems.
A) FIFO
B) Least frequently used
C) Most frequently used
D) LRU
Feedback: 10.4.5
Difficulty: Medium
8. 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.
Feedback: 10.4.1
Difficulty: Medium
9. 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
Feedback: 10.4.2
Difficulty: Medium
10. 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
Feedback: 10.4.2
Difficulty: Medium
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
Feedback: 10.4.3
Difficulty: Medium
12. 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
Feedback: 10.4.3
Difficulty: Medium
13. 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
Feedback: 10.4.4
Difficulty: Medium
14. 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.
Feedback: 10.4.4
Difficulty: Medium
15. 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.
Feedback: 10.4.5
Difficulty: Medium
16. 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.
Feedback: 10.4.5
Difficulty: Medium
17. 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.
Feedback: 10.4.6
Difficulty: Medium
18. 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
Feedback: 10.5.1
Difficulty: Difficult
19. 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.
Feedback: 10.5.2
Difficulty: Medium
20. 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.
Feedback: 10.5.3
Difficulty: Medium
21. 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.
Feedback: 10.6.1
Difficulty: Easy
22. 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.
Feedback: 10.6.2
Difficulty: Medium
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.
Feedback: 10.6.3
Difficulty: Easy
24. 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.
Feedback: 10.7
Difficulty: Medium
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.
Feedback: 10.9.2
Difficulty: Medium
26. 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.
Feedback: 10.9.3
Difficulty: Medium
27. 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.
Feedback: 10.9.5
Difficulty: Medium
28. 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.
Feedback: 10.9.6
Difficulty: Medium
Essay Questions
1. What is the benefit of using sparse addresses in virtual memory?
Feedback: 10.1
Difficulty: Medium
2. Explain the distinction between a demand-paging system and a paging system with swapping.
Feedback: 10.2
Difficulty: Difficult
3. Explain the sequence of events that happens when a page-fault occurs.
Feedback: 10.2
Difficulty: Easy
4. How is the effective access time computed for a demand-paged memory system?
effective access time = (1 – probability of page fault) * memory access time + probability of page fault * page fault time.
Feedback: 10.2.3
Difficulty: Easy
5. Explain how copy-on-write operates.
Feedback: 10.3
Difficulty: Medium
6. Explain the usefulness of a modify bit.
Feedback: 10.4.1
Difficulty: Easy
7. How does the second-chance algorithm for page replacement differ from the FIFO page replacement algorithm?
Feedback: 10.4.5
Difficulty: Easy
8. Explain the distinction between global allocation versus local allocation.
Feedback: 10.5.3
Difficulty: Medium
9. Why doesn't a local replacement algorithm solve the problem of thrashing entirely?
Feedback: 10.6
Difficulty: Medium
10. What are the benefits of using slab allocation to allocate kernel memory?
Feedback: 10.8.2
Difficulty: Medium
11. Explain the concept behind prepaging.
Feedback: 10.9.1
Difficulty: Medium
12. Discuss two strategies for increasing TLB reach.
Feedback: 10.9.3
Difficulty: Medium
13. How are lock bits useful in I/O requests?
Feedback: 10.9.6
Difficulty: Medium
14. Explain how working set model works.
Feedback: 10.6.2
Difficulty: EASY
True/False Questions
1. A page fault must be preceded by a TLB miss.
Feedback: 10.2.1
Difficulty: Easy
2. The instruction that causes a page fault needs to be re-executed after the fault has been handled.
Feedback: 10.2.1
Difficulty: Medium
3. Stack algorithms can never exhibit Belady's anomaly.
Feedback: 10.4
Difficulty: Medium
4. Some operating systems keep a pool of free frames so that the frequency of page faults is lowered.
Feedback: 10.4.7
Difficulty: Medium
5. Some operating systems provide raw disk, so that special applications can bypass file system when accessing secondary storage.
Feedback: 10.4.8
Difficulty: Difficult
6. A reaper starts reclaiming pages as soon as the number of free frames falls below the maximum threshold.
Feedback: 10.5.3
Difficulty: Medium
7. The current best practice to avoid thrashing is to include enough physical memory.
Feedback: 10.6.4
Difficulty: Easy
8. The buddy system for allocating kernel memory is very likely to cause fragmentation within the allocated segments.
Feedback: 10.8.1
Difficulty: Easy
9. In Linux, a slab may only be either full or empty.
Feedback: 10.8.2
Difficulty: Medium
10. Prepaging an executable program is much easier than prepaging a text file.
Feedback: 10.9.1
Difficulty: Easy
11. Solaris uses both a local and global page replacement policy.
Feedback: 10.10.3
Difficulty: Medium
12. Windows uses both a local and global page replacement policy.
Feedback: 10.10.2
Difficulty: Easy
Document Information
Connected Book
Operating System Concepts 10e Complete Test Bank
By Abraham Silberschatz