Topical Information

The purpose of this research project is to explore the utility of task delegation with forking and threading.

Project Information

Your report has to cover the general purpose of forking and threading an application. Pay particular attention to heavy process vs. light-weight process designation. What role do these tools play in parallelism? How do they interact with the library tools exec* and exit?

Support Code Information

The support code will recreate the wc command which counts words, lines, and characters as well as giving a total when applied over multiple files. You'll need to take command-line arguments for this task. These were covered in section 6.14 of your C book. Your command line arguments need only be file names whose character, word, and line counts your user desires.

There will be three versions of this code, however:

Resources

You can find some information on forking in your C book in Chapter 12. There are also many fine web resources such as this one.

Your books, unfortunately, have no information on threading. To find out more about this aspect of the project, you can see many fine pages like this one or this one.

I've also found excellent introductory materials in Understanding Unix/Linux Programming: A Guide to Theory and Practice by Bruce Molay (ISBN: 0-13-008396-8; © 2003 Prentice Hall). Chapter 8 has introductory forking and Chapter 10 has intermediate fork operations. Chapter 14 has lots of great information on threading as well!

The best reference of all for fork, however, is Advanced Programming in the UNIX Environment by W. Richard Stevens (ISBN: 0-201-56317-7; © 1992 Addison-Wesley Publishing). It has lots of detailed information on the fork tool spread nearly throughout its 744 pages. (But oddly no threading...*sniff*)

This assignment is (Level 5). (This does not include any enhancements or add-ons you chose to do below, please add their appropriate level as well.)

Options