Conflict Prevention

In optimistic concurrency control, transactions are allowed to proceed without acquiring locks initially. Conflict detection happens during the validation phase before committing. Transaction causing conflict will be reverted and re-executed to maintain data consistency.

Arcology's transaction scheduler aims to find a balance between minimizing the chance of transaction rollbacks and maximizing parallel execution. It is an integral part of the concurrency control system.

Scheduler

Transaction Scheduler is a critical component dedicated to optimizing transaction processing. It divides transactions into batches, strategically navigating potential conflicts to harness the power of parallel execution.

The scheduler aims to balance the benefits of parallel processing between different batches of transactions while maintaining the state consistency. By ensuring that transactions that could potentially conflict are not scheduled concurrently, the scheduler can reduce the chances of conflicts and thereby the need for rollbacks.

Planning

The scheduler takes into account several factors to create a scheduling plan:

  • Resources Available: The availability of system resources, such as CPU cores, and memory directly impacts the scheduling plan. The scheduler allocates resources efficiently to maximize utilization and throughput. The scheduler can prevent resource contention, bottlenecks, and performance degradation.

  • Transaction Characteristics: Different transactions have varying characteristics that influence their scheduling. For example:

    1. Transaction Priority: High-priority transactions might need to be scheduled before lower-priority ones.

    2. Resource Requirements: Some transactions require more resources than others. The scheduler needs to allocate resources appropriately to ensure fair treatment.

  • Conflict History: The conflict history provides insights into how transactions have interacted in the past. By analyzing past conflicts and their resolutions, the scheduler can make better predictions about potential conflicts by putting the conflict-prone transaction into serial execution sequences.

Transaction Batching

A full scheduling plan consists of a number of parallel batches:

  • Inter-Batch Parallelization: Different batches are processed simultaneously, leveraging available system resources and improving overall throughput.

  • Intra-Batch Serial Execution: Within each batch, transactions are executed in a strictly sequential manner. This intra-batch serial execution ensures that the conflict-prone transactions within a batch do not conflict with each other.

This approach can help manage resources efficiently and minimize contention.

Feedback Loop

Apart from conflict detection, the conflict detector will also provide conflicting information about the interactions and conflicts that have occurred between past transactions. The transaction scheduling module uses the conflict history to make informed decisions about how to schedule transactions concurrently. Learning from the conflict history, the system can optimize scheduling to reduce contention, improve throughput, and minimize rollbacks.

Last updated