Next: The Production System Code
Up: No Title
Previous: No Title
On the class home page I have stored files that implement a parallel
forward-chaining production system on the Sequent. The code works
in the following ways.
- Rules and working memory elements are distributed among the processors.
The database of rules is represented as a list of n sets of rules,
one set for each of n processors.
- The processors all perform the same match and act cycle in parallel.
Conflict resolution is virtually nonexistent -- the first rule that matches
is fired. However, each of these steps is synchronized between
processors. All processors perform match, then all processors perform act,
then all processors communicate changes.
This synchronization step is performed using the
m_sync
command that
we discussed in class.
You do not need to synchronize these steps in the threaded version
of your program. - We do not worry about serialization in this program. Any rules that can
be fired based on local criteria should be fired. (You will not need to make
use of any parallelism matrix for this approach.)
- After an act cycle, working memory changes are sent to processors
that need this information by recording changes in the orders array.
In your threaded version of this program, you need to make sure that any changes
communicated between processors are not overwritten by other processors.
You can ensure this security by placing
locks around segments of code that write to the orders array.
Diane J. Cook
Tue Jan 28 16:59:24 CST 1997