Codexion is a concurrency simulation where multiple coders share a limited number of dongles to compile their code. Given a set of parameters (number of coders, dongles, and time constraints), the program must find a scheduling algorithm that allows every coder to finish compiling within the allotted time.

I built a min-heap scheduler that prioritises coders based on urgency while also accounting for dongle compatibility — if the next coder in the heap doesn’t need the same dongle as one that’s free, a lower-priority coder can jump ahead, improving overall efficiency.

What I learned: pthreads, mutexes, and the fundamentals of concurrent programming — how to manage shared resources safely and avoid race conditions.

What I’m proud of: Taking the time to deeply understand the concepts rather than just making the code work. During evaluations, I was able to clearly explain every design decision.

Peer feedback:

“Really good explanations of complicated topics including threads, mutexes and concurrency in general. Nicely written code and good, descriptive function names… All examples tested produced results as expected.”

— Peer evaluator, 42 London

View on GitHub