All projects

Deadlock Detector

Educational Android mobile game teaching operating system concepts through interactive gameplay and visual deadlock scenarios

Team, May 2025

Deadlock Detector screenshot

Why

An Android game for an operating systems module that teaches deadlock by letting you cause one. Each monster holds one resource and needs another. You drag them into an order and press run.

How it works

Run walks your order once. A monster goes only if the resource it needs is free, and then lets go of its own. Get the order wrong and the game draws who is waiting for whom. Levels have three, five and eight monsters, against 30, 45 and 60 seconds.

Decisions

A safe order, not a cycle search

The game does not hunt for cycles. It checks whether the order you chose is one in which everyone can finish, which is the question an operating system actually asks before granting a resource.

Every puzzle can be solved

A level is generated as a full circle of monsters each waiting on the next, with one link broken. So there is always a safe order to find, and how hard it is depends only on how many monsters there are.

Keep the main thread for touch

Drawing runs on its own thread, game work goes to a pool of two to four workers, and touch handling has a small pool of its own, fed through a hand-written queue. The pools wrap the platform's executor rather than replace it.

My part

A team project. The threading, particles, physics, animation, saved high scores and the write-up are mine.

Built with

Android app
  • Kotlin
  • Android SDK
Concurrency
  • Kotlin coroutines
  • Custom thread pools
Storage
  • SQLite