sorry for that.
I copied mutex and semaphore to explain u.
I thought of giving link.
If u want to explain clearly i will explain in my words.
The first thread was not copied.
check my program carefully and compare with which u have given the link.
Why i am telling confidently because i have developed it and i am working on supercomputer
namely Flosolver. This super computer is the India's first parallel supercomputer.
If u still believe i am ready to remove this thread.