machine mutex is now external; also using try_lock() in most places - should increase performance