Homework Assignments

HW Topic Assignment Due
4 Filesystems

Exploring the Filesystem Structure with FindIt

HW4 Adjustments:

  • -exec and -ok are optional enhancements, as is providing units for numeric arguments ( k, b, etc. ), and the tree option for -largest and -smallest.
  • As discussed in class, the -largest and -smallest expressions should remember the largest and smallest file/dir that they examine, but return true. Then after the search is completed, the largest or smallest found should be reported.
  • It is okay for results to be undetermined if any of the expressions -largest, -smallest, or -summarize appear more than once in a single search.
  • -depth should be interpreted on a directory scale, not a tree scale.
    • ( If -depth is present, then process all of the subdirectories of a directory before the files in the directory itself. Otherwise do the opposite. )
  • All of the expressions that take a single numeric argument ( e.g. -size, -atime, -uid, -links, etc. ) are effectively equivalent, so once you have shown that you can implement one of these, then you are better off spending your time implementing different types of expressions. ( Numeric arguments should support the + or - prefix for greater than or less than. )
  • For -access, the type can be given as either ( r, w, x, or a ) or ( read, write, execute, or any ), with the first option preferred.
  • For -largest and -smallest, the type can be given as either ( f, d, or t ) or ( file, dir, or tree ), with the first preferred.
  • If you don't have time to finish all expressions, the order of priority should be -print, -size, -not, -or, and the custom expressions not found in normal find ( e.g. summarize ).
  • Some optional enhancements that would be particularly useful inlcude -newer ( -older? ) and -name, particularly if the latter supported wild cards in the file naming. ( Which must be escaped to avoid shell interpretation. )
  • The ability to traverse ( recursively ) the directory structure and make use of the results of stat or lstat is NOT optional, as it is the key part of this assignment.
  • Because good user input is hard enough to parse, you do not need to exhaustively check for all possible bad user input. You should still do some when it is easy though.

Useful links:

Fri Dec 6
3 Threaded Applications

Searching for Order Among Chaos Using Threads

Update:

  1. The due date is pushed back to Tuesday, November 19.
  2. Along with your code, please submit a short report documenting what you have learned about threads from this assignment, particularly from running the program multiple times under different conditions and analyzing the results. Some variations you could explore include scope contention, different lock types, different ways of breaking up the data, branch-and-bound on a global or local level, relative performance on different data files, etc. It would be best if you could include some graphics in your report, such as plots of the data you collected and/or screen shots.

Note: in order to use pthreads, you must link in the pthread library, by including "-lpthread" in your gcc or g++ command.

Data Files

Useful links:

Fri Nov 15
2

Inter-Process Communications and Synchronization

( Message queues, shared memory, semaphores, pipes )

Inter-Process Communications and Synchronization Tue 15 Oct
1 Processes statsh - Processes & System Calls

Useful links:

Fri 27 Sept