Operating Systems 2017F: Assignment 3

From Soma-notes
Revision as of 16:18, 15 November 2017 by Soma (talk | contribs) (→‎Questions)

This assignment is not yet finalized.

Please submit the answers to the following questions via CULearn by 11:55 PM on Thursday, November 20, 2017. There are ?? points in ?? questions.

Submit your answers as a single text file named "<username>-comp3000-assign3.txt" (where username is your MyCarletonOne username). The first four lines of this file should be "COMP 3000 Assignment 3", your name, student number, and the date of submission. You may wish to format your answers in Markdown to improve their appearance.

No other formats will be accepted. Submitting in another format will likely result in your assignment not being graded and you receiving no marks for this assignment. In particular do not submit an MS Word or OpenOffice file as your answers document!

Don't forget to include what outside resources you used to complete each of your answers, including other students, man pages, and web resources. You do not need to list help from the instructor, TA, or information found in the textbook.

Questions

  1. [1] If you erase the first few blocks of a filesystem, it will become unmountable; however, fsck will generally be able to fix the filesystem. What allows fsck to do the repair?
  2. [1] Sometimes the kernel will refuse to unmount a filesystem (when the requesting user has sufficient privileges). What is one important reason why this happens?
  3. [2] Is a running Linux system that is generating multiple "Oops" messages at risk of doing something bad, like corrupting data or crashing? Explain.
  4. [2] How can the logical size of a filesystem be larger than the physical size? How can the logical size be smaller than the physical size?
  5. [2] What type is "current" normally in Linux source code? What does "current" refer to?
  6. [2] What line(s) in newgetpid.c sets the name of the device file (i.e. making it /dev/newgetpid rather than /dev/ones)? How did you verify that your answer was correct?
  7. [2] What changes need to be made to newgetpid.c to allow it to respond to write requests? Hint: How does newgetpid.c respond to read requests?