Operating Systems 2019W: Assignment 2

From Soma-notes
Revision as of 03:09, 1 February 2019 by Soma (talk | contribs) (Created page with "'''This assignment is not yet finalized.''' Please submit the answers to the following questions via CULearn by 4 PM on Monday, February 11, 2019. There are ?? points in ?? q...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This assignment is not yet finalized.

Please submit the answers to the following questions via CULearn by 4 PM on Monday, February 11, 2019. There are ?? points in ?? questions.

Submit your answers as a single text file named "<username>-comp3000-assign2.txt" (where username is your MyCarletonOne username). The first four lines of this file should be "COMP 3000 Assignment 2", 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. [2] Assume you have a file A. You type ln A B in order to create file B. What is the relationship between the return of lstat() on A versus B? Explain briefly.
  2. [2] Assume you have a file A. You type ln -s A B in order to create file B. What is the relationship between the return of lstat() on A versus B? Explain briefly.
  3. [2] How could you modify 3000test.c so it can report on what a file's user ID and group ID are and the corresponding username and group name? Specify the changes you make rather than writing all the code out. (In other words, code a solution and explain the changes you made here.)
  4. [2] If you change line 68 of 3000test.c to be data[i] = 'A'; (from count++;), what will the program do? Explain briefly.
  5. [2] What does setup_comm_fn() do in 3000shell?