Highlighted
Flight Engineer
Flight Engineer
  • 902 Views

What is semaphore in Linux OS

Jump to solution

Hi all,

 

how to check semaphore running or not. How to clear semaphore in Linux OS. 

What are the advantage for clear semaphore.

 I am waiting for your valuable reply.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Starfighter Starfighter
Starfighter
  • 856 Views

Re: What is semaphore in Linux OS

Jump to solution

If this is the solution to your question, please don't forget to "Accept as Solution".

-STM

--
Principle Technical Marketing Manager, Red Hat Enterprise Linux
Red Hat Certified Engineer (100-000-264)

View solution in original post

0 Kudos
Reply
Loading...
3 Replies
Highlighted
Starfighter Starfighter
Starfighter
  • 876 Views

Re: What is semaphore in Linux OS

Jump to solution

Semophores are not a service, they are a memory construct provided by the linux kernel.  So to answer your first question running or not, the answer is Not Applicable.  To see which ones are in use,  /proc/sys/sysvipc/sem

How to clear one?  I have no idea.  As a systems administrator that's not something we would really, ever, want to do.  Semaphores are a type of shared memory used to pass data between threads of an application.  So by us externally modifying the contents of a semaphore, that would have consequences for any application utilizing that semaphore.

Semaphores are used in the application programming world, here's a pretty in-depth article on the types, uses, and system calls for them in Linux that I found:

https://0xax.gitbooks.io/linux-insides/content/SyncPrim/linux-sync-3.html

From a System Administration view, I think you'd be interested in the /proc/sys/kernel/sem file since that's where the values for how many and the sizes of the semaphore arrays are stored (and changable).

-STM

 

 

--
Principle Technical Marketing Manager, Red Hat Enterprise Linux
Red Hat Certified Engineer (100-000-264)
0 Kudos
Reply
Loading...
Highlighted
Flight Engineer
Flight Engineer
  • 872 Views

Re: What is semaphore in Linux OS

Jump to solution

Hi @Scott ,

thanks for share valuable information.

0 Kudos
Reply
Loading...
Starfighter Starfighter
Starfighter
  • 857 Views

Re: What is semaphore in Linux OS

Jump to solution

If this is the solution to your question, please don't forget to "Accept as Solution".

-STM

--
Principle Technical Marketing Manager, Red Hat Enterprise Linux
Red Hat Certified Engineer (100-000-264)

View solution in original post

0 Kudos
Reply
Loading...
Join the discussion
You must log in to join this conversation.