Tutorial (Chapter 9)
Tutorial (Chapter 9)
1. If a memory reference takes 100 nanoseconds and a search in the Translation Look-aside Buffer
(TLB) takes 20 nanoseconds, what is the effective access time if 85 percent of all page table
references are found in the TLB? (Assume that finding a page-table entry in the associative
registers takes zero time if the entry is there.)
2. When does a page fault occur? Describe the actions taken by the operating system when a page
fault occurs.
a. A page fault occurs when an access to page that has not been brought into main
memory takes place
b. The operating system verifies the memory access
i. If invalid (page is not in the process’ logical address space), abort the program
ii. If valid,
1. a free frame is located
2. I/O is requested to read the needed page into the free frame
3. Upon completion of I/O, the process table and page table are updated
and the instruction is restarted
3. Assume a page string for a process with m frames (initially all empty). The page reference string
has length p with n distinct page numbers occurring in it. For any page-replacement algorithms,
4. 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?
a. Thrashing is caused by under allocation of the minimum number of pages required by a
process, forcing it to continuously page fault
b. The system can detect thrashing by evaluating the level of CPU utilization as compared
to the level of multiprogramming and disk utilization
c. Reducing the level of multiprogramming can eliminate it
- The system obviously is spending most of its time paging, indicating thrashing
- If the level of multiprogramming is reduced
o Each resident process would receive more frames
o Would page fault less frequently
o CPU utilization would improve
- Another way to improve performance would be to get more physical memory (more frames)
or a faster paging drum (quicker page swaps).
a. Install a faster CPU.
i. No, CPU already under utilized
b. Install a bigger paging disk.
i. Swapping device used to hold the images of pages no longer held in main
memory
ii. No, it is busy because it keeps paging in to memory
c. Increase the degree of multiprogramming.
i. No, memory is already over allocated. Hence too few frames to go around
d. Decrease the degree of multiprogramming.
i. Yes, more frames for each process should reduce page faults
e. Install more main memory.
i. Yes, will also increase frames per process, hence lesser page faults
f. Install a faster hard disk, or multiple controllers with multiple hard disks.
i. Yes, CPU can get data quicker because disk bottleneck is reduced
g. Add prepaging to the page fetch algorithms.
i. Yes, CPU can get data quicker page is there before is made
ii. This assumes there is locality of data
h. Increase the page size.
i. Yes and NO
ii. Yes if data has good locality
iii. No if data has bad locality. Bigger size means lesser pages, so more page faults
and longer time to page