Updated delete logic to take possible lock into account
Updated process handling and scheduler implementation