when allocating new machines take count of all machines
apply locked-by changes to machine.py