Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Difference and attributes of semaphore and mutex
ram619
 Posted: Apr 1 2013, 07:23 PM
Quote Post


SLF Newbie


Group: Members
Posts: 1
Member No.: 2396
Joined: 1-April 13









I am a bit confused with semaphore and mutex, please verify following

Mutex:-
1. Recursive locking allowed or not ?
Answer- As I think its operating system dependent.
2. holder can sleep or not ?
Answer- Can Sleep, even while holding lock.
3, is scope limited within the process ??? that is it can't be used between two process ?
Answer- Can be used between processes

4. It can't be acquired by interrupt handler or bottom half

5. to be used when u want long lock hold time ?????

6 its used for locking

7. strictly manages two tasks

Semaphore:-

1. Recursive locking allowed or not ?
Answer- not allowed ?
2. can sleep or not ?
Answer- Can Sleep.
3, is scope limited within the process ??? that is it can't be used between two process ?
Answer- Can be used between processes

4. its for synchronization or can be taken as signaling mechanism.
5. Manage pool of tasks.
PM
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll