ASSIGNMENT - II

Due Date: 12 November 2019

Note that 12 December is a holiday (Guru Nanak's Birthday) but you can send emails until 5:00 PM.


There are three questions. The first question has to be done by you based on your programs written during the lab sessions. You may discuss your results but the entire assignment MUST be done in your own words and on your own experiments.

  1. (8 Marks) Assume that processing each memory reference takes unit time if the address is already in physical memory. Any page fault requires a processing time of 50 time units and a page replacement requires 100 time units. Let the time taken to process all memory references be Pt. Let the ideal time be It = size of the process (i.e., number of memory references written into the file output by the process simulator). Measure the slow-down in process running time (% slow-down)as

    S = 100 (Pt - It) / It
    Also measure the overall slow-down as
    100 Σ(Pt - It) / ΣIt

    Analyse the results from running your virtual memory lab programs. Are the answers what you expect or are they different?

    We are using random numbers everywhere in our simulations. Repeat your experiments a few times (between 5 and 10 times) and use the average values each time.
  2. (8 Marks) Suppose we have a file system that uses 1KB blocks and 4B file pointers (i.e., 256 file pointers fit in a block). All the file descriptors are in memory. For three files with sizes of 100B, 10KB and 10MB, find out how many disk reads are needed to read the first byte and the last byte from the files. Do this for the following file systems: contiguous, block pointers in contiguous disk blocks on the disk, UNIX inode hybrid system and inverted FAT system.
  3. (4 Marks) Trace how a read on a device is implemented in the different layers of an operating system using a hard disk read as an example. Also, write clearly how the major and minor numbers of a device are used to identify relevant device drivers. Assume that all the file descriptors and the inverted file tables are in memory.

Due Date: 12 November 2019