Back to problems

Concurrent Simple Bank System

Object-Oriented Programming · Okta · Medium

Problem Statement Start from a bank in which each account is identified by a number and holds a balance. The bank exposes three operations — deposit, withdrawal, and transfer — and every one of them validates the account identifier and the amount before touching any state. Now extend that model so several threads can call it at the same time: Every operation must be safe to invoke concurrently. When multiple operations hit the same account, the balance invariants must still…

Checking your access…