The Prolog program is stored in shared memory. During execution, the actual work is to explore a search tree implicitly defined by the Prolog program. The available work is represented as choicepoints containing outstanding execution alternatives on one of the WAM stacks. The work is performed concurrently by the workers. A distributed scheduler is responsible for dynamic load balancing of available work among available workers.
Workers try to maximize the time they spend working and minimize the time they spend scheduling.
In the Muse model each worker keeps its own WAM stacks to avoid conflicting variable bindings in common parts of the search tree. All of P's private choicepoints are then made public and the difference between P's and Q's state is copied from P to Q. Q can then simply simulate failure to backtrack for work. Scheduling The two main functions of the scheduler are to maintain the sequential semantics of Prolog and to match idle workers with the available work with minimal overhead. Cut, Side Effects and Suspension Cut has a semantics strictly compatible with sequential Prolog. In this case the worker executes as much as possible of the cut operation, saves information in the public search tree on how to later on continue executing the cut operation, and then the worker continues with the current work.