The simulator visualizes multiple threads racing to enqueue and dequeue nodes on a shared linked list, showing each compare-and-swap attempt, its success or failure, and the moment the tail pointer lags one node behind reality until another thread helps advance it.
Add threads and trigger enqueue or dequeue operations, then step through execution one atomic instruction at a time to watch the head and tail pointers, the linked list structure, and each compare-and-swap outcome update in real time.
Buttons to spawn threads and issue enqueue or dequeue requests, a step control to advance one atomic operation at a time, a speed slider for continuous playback, and a reset control to restore the queue to its initial dummy-node-only state.
The tail pointer in a Michael-Scott queue is allowed to be stale by exactly one node at any moment, and every operation is written to detect and repair that staleness opportunistically, which is precisely what lets the algorithm avoid ever needing a lock.
The simulator visualizes multiple threads racing to enqueue and dequeue nodes on a shared linked list, showing each compare-and-swap attempt, its success or failure, and the moment the tail pointer lags one node behind reality until another thread helps advance it.
The simulator visualizes multiple threads racing to enqueue and dequeue nodes on a shared linked list, showing each compare-and-swap attempt, its success or failure, and the moment the tail pointer lags one node behind reality until another thread helps advance it.
Add threads and trigger enqueue or dequeue operations, then step through execution one atomic instruction at a time to watch the head and tail pointers, the linked list structure, and each compare-and-swap outcome update in real time.
The tail pointer in a Michael-Scott queue is allowed to be stale by exactly one node at any moment, and every operation is written to detect and repair that staleness opportunistically, which is precisely what lets the algorithm avoid ever needing a lock.