You can find the original homework document here. The homework due date has been extended to 12:00 noon, Saturday October 18th.
Remember that you need a
Readme for the programming portion of the homework. You may have one for each program, or a combined
Readme for both programs. The source code (and other required files) for both programs should be saved to your virtual floppy drive (
fd1) in Minix. To hand in your code, simply hand in a compressed version of
floppy.img. (For help with the virtual floppy, please see the 'Using Minix' section.)
You also have to turn in answers to the first four questions. You may put these answers in a simple text file. PDF files are also permitted. (You can save your answers to the virtual floppy, or hand in a separate file from
floppy.img.) Please have everything named such that we can easily find your answers and source code!
handin procedure can be found in the 'General Info' section. Here are the specific commands you will need for this assignment:
tar czvf homework1.tar.gz [file_list]
handin cs150 hw1 homework1.tar.gz
handin cs150 hw1
[file_list] is a space-separated list of the files you want to turn in. Please do not forget to compress
floppy.img before submitting!
To receive full credit, you must:
Also, please remember that you must independently write and test your own code. (Discussion is allowed during the program design phase, and to help others debug code.)
- Hand in all necessary files on time
- Have answers to the first four questions completed
- Have program 1 and program 2 working properly
- Include a
Readme for the programs
- Properly commented code
Questions 1 - 4
- For question 3, see
mpx386.s, on page 596.
- To be safe, please state in your
Readme what processes you are or are not accounting for in your final process total. For example, are you including
init in your final total? What about the parent process? The user shell?
- You do not need to worry about symbolic links.
- You do not need to worry about hidden files.
- Make sure to print directory names in addition to file names.
- Treat links (hard links) the same as files (just print out full path name to link).
Homework Hints & Tips
- Include the line
#define _POSIX_SOURCE 1 to prevent getting the warning implicit declaration of function kill. (See Eric's response to post 'implicit declaration of kill?' on the newsgroups.)
- Without comments, program 1 will be somewhere around 30 lines of code or more. (This is a very rough estimate.)
- If you type
man ln in Minix, it will provide a description of hard links. Handle hard links just as you would any other file.
- To get the absolute pathname from a relative pathname, you might want to try using
getcwd. Refer to the man pages for more information. (See the 'pathname' post on the newsgroups.)
- Without comments, program 2 will be somewhere around 100 lines of code or more. (This is a very rough estimate.)
- For examples that may help with this program, see these lecture notes.