CS170 Homework 7

Homework 7

These problems should be done on your own. As usual, we're not going to grade these strictly (we'll mainly look at whether you attempted them).

This homework is intended to reinforce knowledge and skills that the second midterm will cover.

Page table size

Consider a processor architecture with 32-bit virtual addresses. In this architecture, the memory management unit (MMU) expects a two-level page table structure. On this architecture, the upper 6 bits of an address determine the page directory index, the next 10 bits determine the index in the second-level page table, and the bottom 16 bits determine the offset.
  1. How many entries are in a page directory? Explain briefly.
  2. How many entries are in a second-level page table? Explain briefly.
  3. What is the page size on this machine? Explain briefly.
  4. What is the maximum number of virtual pages per process? Explain briefly.

Page replacement policy

Suppose FIFO page replacement is used with four page frames and eight pages and the program accesses the virtual pages in this order: 0172327103. How many page faults will occur if the four frames are initially empty? Now repeat this problem for LRU.

Disk performance

Consider a disk with the following characteristics:
  1. What is the storage capacity of the disk in bytes or gigabytes? (Explain briefly.)
  2. What is the sequential transfer bandwidth, expressed in bytes/second or megabytes/second? (Explain briefly.)
  3. Now assume that the disk with the above characteristics is given a never-ending stream of requests to read one sector at a time, with each request chosen randomly from all possible sectors on the disk. Assume that these read requests are scheduled in FIFO order. State the effective long-term transfer rate that the disk can sustain, expressed in bytes/second or kilobytes/second, and explain briefly.
In doing the third question, the following may be useful:

File systems

Consider a file system that has the following description:
  1. State the maximum file size, and explain briefly, for example by showing your work. You may express your answer as a sum of powers-of-two.
  2. State the maximum number of files in a directory, and explain briefly, for example by showing your work. Again, you may express your answer as a sum of powers-of-two.

Handing in the homework

Write your answers in a text file. Name the file answers.txt and upload it on GauchoSpace


Last updated: 2020-03-27 23:24:28 -0700 [validate xhtml]