update benaphore and mutex