RE: Semaphores Vs Mutex.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 'Mutex' and 'Semaphore' both are use for resource sharing.

True

> Mutex is use if the resource is to be shared by Processes and semphore is if
> the resource is to be shared by thread in a Process.

Mutex allows _only_one_ process _or_ thread to access a resource, while semaphore may allow more than one. A semaphore that is initialized with count as 1 is a mutex.

> ...Regards,
> Sachin
> 
> 
> -----Original Message-----
> From: kernelnewbies-bounce@xxxxxxxxxxxx
> [mailto:kernelnewbies-bounce@xxxxxxxxxxxx]On Behalf Of A, Honne Gowda
> (Honne)
> Sent: Monday, March 14, 2005 2:07 PM
> To: kernel newbies
> Subject: Semaphores Vs Mutex.
> 
> 
> Hi All,
> I am confused abt the differences and usage(when and where) of these
> mechanisms. I think they are one and the same with the concept wise(I dont'
> know I am correct or not).
> Can anybody help me out in understing these primitives?
> 
> thanks,
> -HG
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 
> 
> http://www.patni.com
> World-Wide Partnerships. World-Class Solutions.
> _____________________________________________________________________
> 
> This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to
> whom this message was originally addressed. Any review, e-transmission
> dissemination or other use of or taking of any action in reliance upon
> this information by persons or entities other than the intended
> recipient is prohibited. If you have received this e-mail in error
> kindly delete  this e-mail from your records. If it appears that this
> mail has been forwarded to you without proper authority, please notify
> us immediately at netadmin@xxxxxxxxx and delete this mail.
> _____________________________________________________________________

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux