Experiences Implementing a Parallel ATMS on a Shared-Memory Multiprocessor

TL;DR

This paper explores parallelizing the Assumption-Based Truth Maintenance System (ATMS) on a shared-memory multiprocessor to overcome its significant computational demands. While initial attempts showed limited speedup due to large task grain sizes and synchronization bottlenecks, subsequent refinements like finer-grained tasks and modal access to the environment database yielded moderate speedups, highlighting the inherent challenges in achieving high parallelism for ATMS.

What Problem Does This Paper Address?

The Assumption-Based Truth Maintenance System (ATMS) is a powerful tool in Artificial Intelligence (AI) for managing beliefs and their dependencies, simplifying the design of complex problem solvers. However, its widespread adoption has been hampered by its substantial computational resource requirements, often making it the bottleneck in AI systems. This paper investigates whether parallelizing the ATMS on a shared-memory multiprocessor can alleviate these performance issues and achieve significant speedups.

Methods

The authors begin by implementing an efficient sequential ATMS in C, based on existing techniques. They then extend this to a parallel version for the Encore Multimax, a 16-node shared-memory multiprocessor. Key modifications include:

  • Division of Work: The overall structure maintains a concurrent ATMS and problem solver, sharing a command queue. Crucially, the requirement for labels to be sound and complete after every command is relaxed, only enforced before Node-Query commands. This reduces synchronization overhead but makes Node-Query operations more expensive.
  • Locking Mechanisms: To manage concurrent access to shared data structures (nodes, environments, hash tables), mutual-exclusion locks are employed. Initially, straightforward locking is used, with later modifications to address bottlenecks.
  • Environment Database Access: A significant bottleneck is the environment database (Consistent and Minimal Nogood tables). To improve concurrency, a "modal access" approach is introduced, allowing different modes of access (Free, Consistent, NG) to prevent conflicts. This also includes a mechanism where processors can pull new nogoods from a global list if they encounter the NG mode.
  • Task Granularity: Initially, tasks are defined by ATMS commands. To address large grain sizes (e.g., a single justification taking a significant portion of runtime), tasks are redefined as individual "Update requests." Further refinement involves "stealing" Update requests from other processors' stacks when idle.

Datasets

The paper evaluates the parallel ATMS using three problem solver trace files:

  • QPE: From a problem solver for Qualitative Physics problems.
  • BUG: A trace that previously revealed a bug in an ATMS implementation.
  • 8-Q: From a problem solver for the 8-queens problem.

These traces represent interactions between a problem solver and an ATMS, dumped into files. The paper notes that these traces do not include Node-Query commands, which would have necessitated more global synchronization in the parallel version, making the presented results optimistic.

Key Insights and Ideas

  • Parallelism is Elusive: Despite the ATMS having thousands of justifications, which appear to offer abundant parallelism, exploiting it effectively is challenging. The apparent abundance of independent tasks doesn't translate directly to linear speedup.
  • Grain Size is King (and a Killer): The most significant bottleneck is the enormous variation in task grain size. A single justification can account for a large percentage of the total runtime, making it difficult to distribute work evenly among processors. This leads to significant processor idle time.
  • Relaxing Synchronization is Crucial: Requiring global synchronization after every command severely limits parallelism. Relaxing this to only enforce consistency before Node-Query commands is essential for achieving any speedup.
  • Environment Database is a Bottleneck: The environment database, crucial for consistency checks, becomes a major point of contention. Novel locking strategies like modal access are necessary but still don't fully eliminate synchronization overhead.
  • Work Explosion with Finer Grains: Attempting to reduce grain size by splitting Update requests can lead to an "explosion" in the amount of work done, negating the benefits of parallelism. This suggests a fundamental challenge in finding a natural, small task grain for ATMS.

Key Results

  • Initial Program (P1): Using 14 processors, speedups were modest: 3.9 for QPE, 1.6 for BUG, and 6.5 for 8-Q. This was far below expectations, even considering the global lock.
  • Processor Idle Time: Program P1 suffered from significant processor idle time (54%, 72%, 5% for QPE, BUG, 8-Q respectively).
  • Finer Grain Program (P2): Redefining tasks as Update requests and introducing work stealing improved speedups, but they were still "far from ideal."
  • Modal Access Program (P3): Further refinements, including modal access to the environment database, reduced contention but still resulted in speedups "far from ideal."
  • Overall Speedups: For the three traces, speedups using 14 processors ranged from 4.7 to 8.4.
  • Work Measurement: The parallel ATMS performed between 90% and 106% of the work of the sequential ATMS for 14 or fewer processors, indicating that the speedup reduction wasn't solely due to redundant work but also synchronization and other overheads.

Limitations and Future Work

  • Hardware Contention: The paper acknowledges hardware contention issues (bus bandwidth, cache interactions) that can preclude linear speedups and are not reflected in utilization graphs.
  • Trace Limitations: The traces used did not include Node-Query commands, which would have increased synchronization needs and potentially reduced speedups.
  • Need for New Insights: The authors conclude that significant further speedup from parallel processing requires a "major new insight" beyond simply reducing grain size or improving synchronization, as these approaches can lead to an explosion of work.
  • Future Work: The paper suggests that exploring different parallel machine architectures (beyond shared-memory) and finding a more natural, smaller task grain are important future directions.

Summary updated

BibTeX
@inproceedings{1989experiences,
  title = {{Experiences Implementing a Parallel ATMS on a Shared-Memory Multiprocessor}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1989},
}
Figure