TL;DR
This paper introduces "Multiple Worlds," a novel operating system approach that tackles the challenge of improving response time by running multiple alternative solutions to a problem concurrently. It proposes a system that manages these competing "worlds" using copy-on-write virtual memory and a specialized message layer to handle interprocess communication, enabling faster and more fault-tolerant computations.
What Problem Does This Paper Address?
The paper addresses the fundamental question of how to effectively utilize increasing computational resources (like multiple processors) to solve problems faster and more reliably. While traditional parallel processing decomposes problems into cooperating processes, this work focuses on a different paradigm: running competing processes that pursue alternative solutions to the same problem. The primary motivation is to improve response time – the wall-clock time to complete a computation. The core challenge lies in managing the complexity of these concurrent alternatives, specifically:
- Side Effects: How to prevent or manage unintended interactions and inconsistencies between concurrently running alternatives, especially when they involve shared state or I/O.
- State Management: How to efficiently preserve the state of each alternative, which can lead to a combinatorial explosion in the amount of memory required.
Methods
The paper proposes the "Multiple Worlds" scheme, which relies on several key techniques:
- Concurrent Alternatives: Instead of cooperating, multiple processes are spawned, each executing a different method or strategy to solve the same problem.
- Copy-on-Write (COW) Virtual Memory: This is central to managing the state of each "world." When an alternative needs to access or modify shared state, COW ensures that a private copy is created only when a write operation occurs. This significantly reduces the overhead of state duplication compared to traditional copying.
- Process Management: Each alternative runs as an independent process. The system uses two new primitives:
alt_spawn(n): Spawnsnchild processes, each representing an alternative "world." It returns different values to the parent and children, allowing them to distinguish their roles.alt_wait(): This primitive is used by the parent to wait for the first successful completion of any alternative. Upon completion, the winning alternative's results are committed, and all other competing processes (siblings and the parent) are terminated. This "elimination" strategy is key to achieving speedup.- Specialized Message Layer: To handle interprocess communication (IPC) and side effects, a message-passing system is employed. Messages carry "predicates" that encapsulate the assumptions under which the sender is operating. This allows receivers to check for consistency and, if necessary, create new "worlds" to handle potential conflicts, ensuring that side effects are managed transparently.
Datasets
Not discussed in the paper. The paper focuses on a theoretical model and an experimental application (polynomial root finding) rather than large-scale datasets.
Key Insights and Ideas
- Optimistic Execution via Elimination: The core idea is to run alternatives optimistically. Instead of waiting for locks or explicit synchronization, each alternative proceeds assuming it will be the successful one. The "winner" is determined by speed, and all others are eliminated. This is a form of optimistic concurrency control.
- Fault Tolerance as a Byproduct: The "Multiple Worlds" approach inherently provides fault tolerance. If one alternative fails (e.g., due to a bug or an unexpected input), other alternatives can still succeed, and the system can still produce a result. This is demonstrated in the Jenkins-Traub algorithm example.
- Copy-on-Write is Crucial for Efficiency: The paper strongly emphasizes that COW virtual memory is essential for making the "Multiple Worlds" approach practical. Without it, the overhead of duplicating state for each alternative would be prohibitive.
- Predicates for Managing Side Effects: The use of predicates in messages is a novel way to manage side effects in a distributed or concurrent setting. It allows processes to reason about the assumptions of others and to adapt by creating new worlds when those assumptions might lead to inconsistencies.
- Speedup is Data-Dependent: While the goal is speedup, the paper acknowledges that the degree of speedup is not always linear and depends heavily on the "dispersion" of execution times among alternatives and the overheads of the system.
Key Results
- Demonstrated Speedup: The paper presents experimental results using the Jenkins-Traub algorithm for finding polynomial roots. On a multiprocessor workstation, they achieved speedup by running multiple instances of the algorithm with different starting angles. For example, with 2 processors, the parallel execution time was 9.6 seconds compared to an average sequential time of 12.1 seconds.
- Fault Tolerance Shown: The Jenkins-Traub experiment also demonstrated fault tolerance, with failures occurring in some alternatives but the overall computation still succeeding.
- Low Overhead for Sibling Elimination: Measurements indicated that eliminating competing processes (siblings) was remarkably inexpensive, requiring only a few milliseconds per process.
- COW Overhead is Manageable: Experiments with COW fork operations showed that the overhead is significant but manageable, especially when the fraction of written pages is low.
Limitations and Future Work
- Combinatorial Explosion: The paper acknowledges the potential for a combinatorial explosion in the number of processes and the amount of state, especially in complex scenarios.
- Predicate Management Complexity: While predicates are powerful, managing them, especially in deeply nested "Multiple Worlds" scenarios, could become complex.
- Distributed Settings: The paper notes that copying costs are higher in distributed settings, and while "Multiple Worlds" can still be effective, it requires careful consideration.
- Future Work: The authors suggest exploring the combination of "Multiple Worlds" with traditional cooperative parallelism. Further experimental work is needed to understand the performance implications of the interprocess communication scheme and to refine strategies for choosing the optimal number of alternatives and their granularity. They also mention the potential for combining this with distributed systems and process migration.
Summary updated