开发者

different types of synhronization methods in linux?

what are the di开发者_如何学JAVAfferent types snchronization methods ?(other than semaphore,mutex,binary semaphore)


I'm assuming that you're talking about application development and not Kernel development.

Linux supports Posix synchronization techniques. Some common ones are a mutex (for multi-threaded applications) and semaphores. You can use these in many ways... An example of semaphore usage would be multiple processes and keeping a semaphore in shared memory.

I recommend you do some reading of the following manpages:
sem_init
pthread_mutex_init

Also, here's a good discussion on the usage of file locking

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜