On 12/21/05, Badari Prasad <h.badari@xxxxxxxxx> wrote:
it is a mandatory lock mechanishm , where the requesting process checks for a value to get positive ( as semaphores r initalised to a value depending on usage ...AFAIR ..plz CMIIW) , there r generally 2 operations on them.
sem wait and sem post.
check any book on linux prograaming on their implementation....
good luck
Hello,
I have a Query regarding semaphores, is semaphores a mandatory lock mechanism ( like lockf() ) ,or an advisory lock mechanism ( like flock () ).
it is a mandatory lock mechanishm , where the requesting process checks for a value to get positive ( as semaphores r initalised to a value depending on usage ...AFAIR ..plz CMIIW) , there r generally 2 operations on them.
sem wait and sem post.
check any book on linux prograaming on their implementation....
good luck
If it is an advisory lock mechanism, in which situation the lock be ignored by the other process ( say process2 ) trying to access the data which is locked by process1.
Thank you,
Badari.
--
play the game