Bank Algorithm: part 1