critical sections and programming with locks 3346874