Banker algorithm used in class