|
| 1 | +\chapter{Introduction} |
| 2 | +\label{ch:introduction} |
| 3 | + |
| 4 | +\section{Motivation} |
| 5 | +Distributed systems underpin modern computing, but their behaviour is often difficult to understand from static material because correctness depends on concurrency, message ordering, and assumptions about failures \cite{tanenbaum2017distributed,coulouris2011distributed,lynch1996distributed}. Mutual exclusion is a classic example: a set of distributed processes must coordinate access to a shared critical section without relying on shared memory or a global clock. |
| 6 | + |
| 7 | +Learners commonly struggle to connect algorithm descriptions to concrete executions. This challenge becomes more severe when faults are introduced, since safety properties may remain intact even when progress is lost. Such distinctions are difficult to communicate through static diagrams alone. This motivates the development of an interactive teaching tool that makes state, causality, and fault consequences directly observable. |
| 8 | + |
| 9 | +\section{Project Aim and Objectives} |
| 10 | +The aim of this project is to develop an interactive educational artefact for visualising distributed mutual exclusion and its behaviour under faults and recovery conditions. |
| 11 | + |
| 12 | +The specific objectives are: |
| 13 | +\begin{itemize} |
| 14 | + \item implement a technically correct simulation that preserves the safety invariant of mutual exclusion, |
| 15 | + \item provide step-by-step execution with an explanatory trace, |
| 16 | + \item support representative token-based and message-based algorithms, |
| 17 | + \item support fault injection and recovery to illustrate safety vs liveness trade-offs, |
| 18 | + \item provide reproducible evidence export, |
| 19 | + \item and evaluate the artefact in terms of correctness, usability, and reproducibility. |
| 20 | +\end{itemize} |
| 21 | + |
| 22 | +\section{Scope} |
| 23 | +The delivered system focuses on two representative approaches: |
| 24 | +\begin{itemize} |
| 25 | + \item \textbf{Token Ring}, a token-based mechanism that provides an intuitive model of exclusivity. |
| 26 | + \item \textbf{Ricart--Agrawala (RA)}, a message-based algorithm using Lamport-style timestamps \cite{ricart1981optimal,lamport1978time}. |
| 27 | +\end{itemize} |
| 28 | + |
| 29 | +The system is teaching-oriented rather than production-oriented. The network model is intentionally simplified to support controlled observation and reproducibility. Message loss in RA is used to demonstrate that liveness can fail while safety is preserved; retransmission and failure detectors are not implemented. |
| 30 | + |
| 31 | +\section{Contributions} |
| 32 | +The main contributions of the project are: |
| 33 | +\begin{itemize} |
| 34 | + \item a browser-based, dependency-free Distributed Mutual Exclusion Explorer, |
| 35 | + \item support for both Token Ring and an RA teaching-oriented prototype, |
| 36 | + \item explicit fault injection and recovery mechanisms, |
| 37 | + \item scripted demos for deterministic replay, |
| 38 | + \item an evidence export pipeline (state JSON, trace TXT, preview PNG), |
| 39 | + \item and a reproducible testing and evidence framework built around a freeze baseline. |
| 40 | +\end{itemize} |
| 41 | + |
| 42 | +\section{Report Structure} |
| 43 | +Chapter~\ref{ch:background} reviews distributed mutual exclusion, logical time, fault assumptions, and educational visualisation literature. |
| 44 | +Chapter~\ref{ch:design} presents the specification and design of the artefact. |
| 45 | +Chapter~\ref{ch:implementation} describes implementation details. |
| 46 | +Chapter~\ref{ch:testing} covers testing strategy and execution. |
| 47 | +Chapter~\ref{ch:evaluation} evaluates correctness, usability, and reproducibility. |
| 48 | +Chapter~\ref{ch:professional} discusses professional issues. |
| 49 | +Chapter~\ref{ch:conclusion} concludes the report and outlines future work. |
0 commit comments