CSCI-UA.0202 Spring 2015 Homework 7

Handed out Saturday, March 28, 2015
Due 10:00 AM, Tuesday, April 7, 2015

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.

Event-driven programming

Choose True or False for the following assertions, and justify:

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:

Disk scheduling

Disk requests come into the disk driver for tracks 10, 22, 20, 2, 40, 6, and 38, in that order. A seek takes 6 msec per track moved (note that, among other simplifications, we are not taking into account the length of the seek). How much seek time is needed for the following scheduling algorithms?

(a) SSTF

(b) LOOK (SCAN, but doesn't move to the end)

In all cases, the arm is initially at track 20. (Note that SCAN is a synonym for the elevator algorithm.)

Adapted from Tanenbaum Chapter 5 Number 24.

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.

Last updated: Mon May 04 11:24:46 -0400 2015 [validate xhtml]