Double-ATM-Simulator

Introduction

This project is a Unity-based simulator that demonstrates account data consistency under concurrent access by implementing two independent ATM interfaces operating on the same shared bank account. It is developed for an assignment of DI22004 - Computer Systems 2B.

The core concurrency control uses a simple mutual-exclusion mechanism: when one ATM starts a transaction (withdrawal/transfer), the other ATM — if logged into the same account — displays an “Account Occupied” page and blocks further operations until the first transaction completes or logs out.

Key technical components include: AtmDataManager (central singleton-like account state holder), per-page UI scripts (LoginPage, MainPage, WithdrawPage, TransferPage, RecordPage, OccupiedPage), and AtmTerminal (coordinates dual-ATM logic and triggers occupation check). Artificial short delays are intentionally kept in transaction code paths to make race-condition windows more observable.

The project focuses on UI-driven synchronization rather than low-level threading primitives (no explicit Monitor/Lock/Semaphore usage is described), making it suitable for demonstrating concurrency concepts.

This project was developed using Unity and C#, incorporating key press sound effects, backlit key illumination for the numeric keypad, transaction animation sequences, and pre-configured test accounts.

Accessing

This project has been open-sourced on GitHub.

🔗 Double-ATM-Simulator on GitHub

Found an issue, bug, or want to make a suggestion?

Please report in the “Issues” section of this GitHub project:

  1. Click “New issue”.
  2. Write a title and description as required.
  3. Click “Create”. You can also press Ctrl + Enter on Windows PC or ⌘ ⏎ on Mac.