Homework 7, "DBtH8T8yNcN0U"

This homework is worth 20 points.

Goals

When you finish this homework you should:

Assignment

Your friend Fred has forgotten his password. He uses the same password on all of his accounts and can't get in anywhere. He really needs his password back and has ask you to help him.

He is running a rather old version of linux on his home machine and has found that the second field in his entry in /etc/passwd is DBtH8T8yNcN0U. He remembers that he only used lower case letters in his password. Fred is sure that his password has only 6 characters.

Your task is to write a program using only system calls which will attempt to discover Fred's password. You may not use pre-computed tables or any other external resource in your program. The program should be called searcher.

Your program should be designed to work in parallel. If the command line argument -N n is present, your program should use n processors to perform this task. You may split the search space any way you wish, but I would avoid starting too many processes. For example, for -N 4 I would fork three times. Your program should be designed so that the parent process exits when anyprocess finds the password. Later we will make it so all processes exit when the password is found, but you need not worry about that right now.

Your program may select from several means of communications. Several options include pipes and shared files, but you may think (or research) others.

You should design your program to run without input or output. The final results should be written to a file. This way you can run the program without remaining logged in. (searcher &).

In addition your program should produce timing results. You should compute and output the time required for your program to complete the computation.

For testing, timing and debugging purposes, you should attempt to find the password "zzzzx" which encrypts to DBDLjTPhWLYM2 and takes considerably less time.

As part of your final submission, you should provide report that indicates the time for your program to find the password "zzzzx" for 1, 2, 4, and 8 processors.

As an added incentive the first person who provides Fred's password, including proof that they have found this password with a parallel program they have written wins a $10 Subway gift card. I reserve the right reject program that I judge to involve cheating.

When you are finished email a compressed tar file containing your code, a Makefile and a README file to your instructor. Please do not include executable or object files in your submission.