View Single Post
Old 10-25-2004, 05:20 AM   #1 (permalink)
coolsc81
Registered User
 
Join Date: Oct 2004
Posts: 2
coolsc81 is on a distinguished road
C++ Deadlock Detection Program Help...

I am having a hard time constructing the following C++ program provided the following instructions:

Design a program that can detect deadlocks in a resource graph.

Your program should have a menu system with two options:

1. Construct a resource graph
2. Detect deadlocks
?
If user selects 1, you program should prompt for further inputs as followings.

Source:
Dest.:
More?

If user answer for More is ‘N’ then your program will go back to main menu. Otherwise continue adding more nodes to the resource graph.

When user selects 2, you start to search for a deadlock.

Your program should utilize the following data structure

struct node
{
char name;
node *next1;
node *next2;
};

If you detect a deadlock, you should print program will try to find a deadlock within the resource graph the content of L so that L contains the deadlock set.

Any help that you can provide me would be appreciated, thanks.
coolsc81 is offline   Reply With Quote