Distributed Mutual Exclusion Explorer (v0.3)
token ring + Ricart–Agrawala · step/run · faults · JSON/PNG export
An interactive, browser-based simulator to visualise distributed mutual exclusion. Configure processes, issue requests for a critical section, and observe how tokens or messages enforce exclusivity. The prototype supports token loss, process crash/recovery, and basic message loss (RA).
Configuration
Algorithm:
Token Ring (implemented)
Ricart–Agrawala (prototype)
Processes:
Apply (reset)
interactive
Keep small numbers (3–8) for clarity. Apply resets the simulation state.
Controls
Step
Run
Pause
Reset
Run speed (ms):
Drop token
Regenerate token
Drop next in-flight msg
Arm drop-next-send
Clear trace
Token controls apply to Token Ring. For Ricart–Agrawala, “Drop next in-flight msg” removes the queue head; “drop-next-send” drops the next outgoing message.
Processes
Process
Status
Token
Actions
Status shows whether a process is requesting access or is currently in the critical section.
Network (messages)
For Ricart–Agrawala, each Step typically delivers one message from the queue.
Scenarios
Export JSON (state)
Export trace (txt)
Export evidence (JSON+trace+PNG)
Load example (interactive)
Load example (scripted)
Load crash demo (scripted)
Load RA conflict demo (scripted)
Load RA tiebreak demo (scripted)
Exit script mode
Interactive mode lets you issue requests manually. Scripted mode replays a predefined event sequence from a JSON scenario file. Exports use a session timestamp + snapshot counter for easier evidence management.
Trace
—
Preview & Export PNG
Redraw
Export PNG
The preview uses a circular layout. Token Ring shows token position; RA highlights the next message to be delivered.