ISP: Assignment 2

The assignment, except problem 2, is due at the beginning of class on Monday, October 11. Problem 2 is due October 13. Please follow the instructions in submitting your assignment.

  1. Create a test program that you can run on an unknown architecture to find out how it handles bit and byte alignment. You should test your program on Linux and Solaris (SPARC), at least.

    The test program should be able to find out:

  2. In this problem, you will explore various aspects of character sets and internationalization (I18N). Among the platforms used in class, only Solaris 2.7 currently supports this functionality.

    You can use the sample 8859-1 and UTF-8 files for testing.

    You can also convert between character sets using the iconv utility, e.g.,

    iconv -f 8859-1 -t UTF-8 8859.txt > utf8.txt
    
    converts from an ISO 8859-1 to a UTF-8 file. (Note: If you've already done the collation routine, you do not have to do the modified version. However, collation doesn't seem to be working yet on Solaris.)
  3. Write a test program that checks if your operating system is fully Y2K-compliant. To determine this, check whether it handles the leap year computation for the year 2000 correctly. Use the Unix time and date routines to compute the weekday for February 29, 2000. Check what happens if you try to compute the weekday for February 29, 1999.
  4. Compute file system statistics for your home directory and recursively the files in the directory tree below that. Compute the following statistics: If your CS directory just got setup, it is probably more interesting to tally results for your machine at work or your Cunix account. Sorry, no ftw() allowed.
  5. Stevens, Problem 4.15. Write a program that prints out the date when the last email arrived and when the user last read mail. On CS systems, mail boxes are stored in /home/user/.mailspool.
  6. Stevens, Problem 4.18.

Last updated by Henning Schulzrinne