views:

216

answers:

2

I've heard these words related to concurrent programming, but what's the difference between them?

+3  A: 

There's a wiki article on the subject that explains it well.

Brian Rasmussen
+2  A: 

A lock allows only one thread to enter the part thats locked and the lock is not shared with any other processes, a mutex is the same as a lock but system wide and a semaphore does the same as a lock but allows x number of threads to enter...

Petoj