Skip to Content

What is Semaphore? ( SM50, sem)

What is Semaphore?

In computer science, particularly in operating systems, a semaphore is  a variable or abstract data type that is used for controlling access,  by multiple processes, to a common resource in a parallel programming or a multi user environment.

What do the semaphores mean in SAP?

In trace files or in transaction SM50 (process overview),

Semaphores are mentioned. How do you determine which semaphores control what?

Reason and Prerequisites ?

If a work process locks a particular resource, it sets a semaphore. Another work process that also wants to access it must then wait. In this case, the number of semaphores is displayed by SM50.

Example: if any user while login (6: ROLL_ADM (roll administration)) semaphore will be locked, semaphore 6 is set.

How to Monitor Semaphores ?

Using SM50 transaction code. Find below screen shots.


Find below screen shot , How to see all the sap related semaphores by pressing F1 key.


In Operating system level ( MMC ) also you can observe in sem column (10 & 4 )



Shiva Kumar

You must be Logged on to comment or reply to a post.
  • well - nice document!

    To be added:

    1. semaphores are used to synchronize concurrent access to shared resource (mostly shared memory) to avoid corruptions.
    2. In the MMC the current semaphore holder has a negativ semaphor value, waiters a positiv one. Only one semaphore per process can be shown in SM50 - but a process can hold more than one semaphore at a time.

    This document is not windows specific. Therefore I am going to move it to the appropriate area within the next days.



    • Thanks peter

      I am unable to capture those (but a process can hold more than one semaphore at a time) screen shots.  I will try to capture and I will put here.