Skip to Content

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.

/wp-content/uploads/2014/03/1_416628.png

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

/wp-content/uploads/2014/03/2_416629.png

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

/wp-content/uploads/2014/03/3_416872.png

Thanks

Shiva Kumar

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Peter Simon

    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.

    regards

    Peter

    (0) 
    1. SivaKumar Kilari Post author

      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.

      (0) 

Leave a Reply