CS520
Fall 2013
Lab 13
Due Wednesday, December 4


Searching a Graph using Multiple Threads

The starter code for this lab consists of the following files:

The function build_graph(int size) constructs a graph for you. Each node has an ID, a flag to indicate whether or not it has been touched, a threadID that denotes which thread found the node, a lock, and a collection of 4 pointers that go to other nodes in the graph. The function print_graph prints out the graph, print_tags prints which items go tagged by what thread, and destroy_graph deletes the graph and all related structures.

The only file you should modify is graphsearch.c. If you find you need to modify graph.c or graph.h or the makefile, you may want to speak to me.

You should replace the call to dfs with a call to a function that will do the same thing using more than one thread.

Compiling

Your program should compile with the makefile provided.

Grading

In addition, remember, you may lose points if your program is not properly structured or adequately documented. Coding guidelines are given on the course overview webpage.