You are on page 1of 2

Peter Lim

Chapter 9

9.16 Consider a system that uses pure demand paging.


a. When a process first starts execution, how would you characterize the page-fault rate?

- Since needed pages are not yet loaded to the memory, the page-fault rate is high

b. Once the working set for a process is loaded into memory, how would you characterize
the page-fault rate?

- Since all needed pages are already loaded to the memory, the page-fault rate should be
low

c. Assume that a process changes its locality and the size of the new working set is too
large to be stored in available free memory. Identify some options system designers could choose
from to handle this situation.

- One option could be to retrieve the pages because of the high page-fault rate
- Another is to get more physical memory

9.17 What is the copy-on-write feature, and under what circumstances is its use beneficial? What
hardware support is required to implement this feature?

- Mapping the pages into their address spaces are helpful when two programs with the
same set of program values are accessed
- A copy must be made for a write to take place because this prohibits the copies from
interfering each other
- Consultation from the page table is needed for the page’s write protection to be
confirmed

9.32 What is the cause of thrashing? How does the system detect thrashing? Once it detects
thrashing, what can the system do to eliminate this problem?

- Cause of thrashing is by the insufficient allocated number of pages required by a process


- This results to continuous page faulting
- Comparing the level of CPU utilization to the level of multiprogramming allows the user
to detect thrashing
- Solution is to reduce the level of multiprogramming
9.33 Is it possible for a process to have two working sets, one representing data and another
representing code? Explain.

- Processors provide two TLBs for this


- The code accessed by the process can retain the same working set; but it can change at
some point
- The change will eventually affect the working set for data accesses

9.36 A system provides support for user-level and kernel-level threads. The mapping in this
system is one to one (there is a corresponding kernel thread for each user thread). Does a
multithreaded process consist of (a) a working set for the entire process or (b) a working set for
each thread? Explain

- It provides a working set for each thread


- Unique execution sequences are present for each kernel thread

9.38 Consider a system that allocates pages of different sizes to its processes.
What are the advantages of such a paging scheme? What modifications to the virtual memory
system provide this functionality?

- Programs can have large code segments and large-sized arrays as data
- Decreasing memory can happen if portions of the programs can be allocated to larger
pages
- Complex codes are needed for address translation to consider different page sizes

You might also like