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.
If this is the solution to your question, please don't forget to "Accept as Solution".
-STM
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
Hi @Scott ,
thanks for share valuable information.
If this is the solution to your question, please don't forget to "Accept as Solution".
-STM
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.