Multithreaded Banking System in C (POSIX Threads) | Tested on Kali Linux & Linux Mint - CS311

Опубликовано: 18 Июнь 2026
на канале: Anime Nerd
34
1

A video shows how a small bank program works when many clients act right away. The code is written in C and uses POSIX threads - each banking request runs in its own lightweight process.

Every request - deposit, withdrawal or query - lands in a fresh thread. A single mutex guards the shared account data - no two threads change the balance at the same moment. The guard locks before an update and unlocks after, keeping the numbers correct.

Tests ran inside two virtual machines - one with Kali Linux, one with Linux Mint. Both systems executed the same set of operations - add money, remove money, attempt a withdrawal with too little funds and launch many requests together. All tests passed on both platforms.

Main attributes of the program

It spawns parallel pthread workers for each banking request
A mutex stops race conditions
Each action is logged while it happens
Several test scenarios are built in
The same binary runs on different Linux distributions

The recording serves as course evidence for lessons on operating systems and multithreading.