Home CS439

CS439: Principles of Computer Systems

Discussion Section 7 Problem Set

Due in Section on Friday, March 29, 2024

The problem set must be completed before section and brought to section. To ensure that your problem set is turned in correctly and that you receive credit for discussion section, you must follow these guidelines exactly.

  1. The operating system gives memory to the heap memory manager k page(s) at a time. Why?

  2. Consider a process that dynamically allocates objects A, B, C, and D. After some times has passed, objects B and D are reachable, but A and C are not. Assuming a semi space garbage collection algorithm, what are the contents of the heap after the next garbage collection pass? Be sure to write them in order.

  3. Assume a spinning disk. Where on that disk would you place the inode array? Justify your answer.

  4. 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. How much seek time is needed for the following scheduling algorithms?
    a) FIFO
    b) SSTF
    c) LOOK (SCAN, but doesn't move to the end)
    In all cases, the arm is initially at track 20, and you may assume that the head is traveling towards higher numbers.

    Adapted from Tannenbaum Chapter 5 Number 24.

  5. Susan would like to read the file
    /usr/susan/cs439/study_guide.txt. Assuming she has the correct permissions and is using FFS, describe the steps the operating system would need to take to read the file.