Learn about: Banker's Algorithm

In attempting to learn about it, I found there were two types of explanations of the Banker's algorithm - confusing pseudocode (not great when you're asked to do it by hand), and ones which failed to give any semblance of a "why". Sometimes both at once. So I opened Krita, and now there's this, which hopefully serves as a better teaching tool. Enjoy!

I've also written a small tool which performs the Banker's algorithm, showing the steps along the way (jump to the tool!).

Some details have been left out or simplified to emphasise the purpose above. Please tell me if there's something heinously wrong, though.

Explanation

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6

Visualisation Tool

Inputs

ALLOCATION
{{ resourceIdentifier(resource) }}
P{{ process }}
MAX
{{ resourceIdentifier(resource) }}
P{{ process }}
AVAILABLE
{{ resourceIdentifier(resource) }}
NEED (calculated)
{{ resourceIdentifier(resource) }}
P{{ process }} {{ cell }}

Result (scroll along!)

You might also be interested in:

Investigating a firmware image and its compression

From an opaque firmware image to disassembly in 3 easy steps.

Quick RE: The Tandberg TT6120 'TS Processor'

A quick reverse engineering of a 'Transport Stream Processor', used in TV and video production.

See all posts