synchronization primitives: mutex and condition