info on semaphores | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

info on semaphores

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-14-2008
cromohawk cromohawk is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 17 April 2010, 1:37 AM EDT
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
info on semaphores

hi friends,

may i know what is semaphores?

how do i find limit and status in solaris 10?

please advise...thanks alot
Sponsored Links
    #2  
Old 09-14-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 April 2014, 9:23 PM EDT
Location: NM
Posts: 10,056
Thanks: 250
Thanked 756 Times in 711 Posts
Semapahores are shared memory objects that multiple processes update to allow communication. They are used for process control - Interprocess Communication, IPC.

A solaris admin type can let you know about shared memory resources and how to set them and see them.
Sponsored Links
    #3  
Old 09-14-2008
pupp's Avatar
pupp pupp is offline Forum Advisor  
cap_10hdx 1
 
Join Date: Feb 2008
Last Activity: 22 September 2010, 2:56 PM EDT
Location: Jersey Shore
Posts: 647
Thanks: 0
Thanked 0 Times in 0 Posts
use ipcs:

Code:
ipcs -s

    #4  
Old 09-15-2008
cromohawk cromohawk is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 17 April 2010, 1:37 AM EDT
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
thanks guys.but how do i find " the semaphore values that exhausted and
it recommended values? "
Sponsored Links
    #5  
Old 09-16-2008
pressy's Avatar
pressy pressy is offline Forum Advisor  
solaris cultist
 
Join Date: Aug 2003
Last Activity: 12 March 2014, 9:56 AM EDT
Location: Vienna / Austria (Europe) [EARTH]
Posts: 732
Thanks: 1
Thanked 2 Times in 2 Posts
The Solaris 10 Operating System introduces the following new resource controls to replace the old /etc/system tunables:

Code:
                              Old             Old       New         New
    Resource control          tunable         default   Max value   default
    ----------------------    -------------   -------   ---------   ----------
    process.max-msg-qbytes    msginfo_msgmnb  4096      ULONG_MAX   65536
    process.max-msg-messages  msginfo_msgtql  40        UINT_MAX    8192
    process.max-sem-ops       seminfo_semopm  10        INT_MAX     512
    process.max-sem-nsems     seminfo_semmsl  25        SHRT_MAX    512
    project.max-shm-memory    shminfo_shmmax  0x800000  UINT64_MAX  1/4 physmem
    project.max-shm-ids       shminfo_shmmni  100       2**24       128
    project.max-msg-ids       msginfo_msgmni  50        2**24       128
    project.max-sem-ids       seminfo_semmni  10        2**24       128

As the names suggest, these rctls are attributes of either processes or projects.

The following tunables are now obsolete in the Solaris 10 Operating System:

Code:
    Shared Memory        Semaphores             Message-Queue
    --------------       --------------         ---------------
    shminfo_shmseg       seminfo_semmns         msginfo_msgmax 
    shminfo_shmmin       seminfo_semvmx         msginfo_msgssz 
    shminfo_shmmax*      seminfo_semmnu         msginfo_msgmni*
    shminfo_shmmni*      seminfo_semaem         msginfo_msgtql*
                         seminfo_semume         msginfo_msgmnb*
                         seminfo_semusz         msginfo_msgmap
                         seminfo_semmap         msginfo_msgseg
                         seminfo_semmsl*
                         seminfo_semopm*
                         seminfo_semmni*


   values ending in * are technically obsolete, but if they are present
   in the /etc/system file then at boot the kernel will translate the
   values into global resource controls.

Quote:
Is there a way to find out the current parameter values in SOLARIS 10
have a look at: "prctl $$"

small example, i will add your process.max-sem-ops:


Code:
root@mp-wst01 # su - pressy 
pressy@mp-wst01 #
pressy@mp-wst01 # prctl -n process.max-sem-ops $$
process: 16510: -ksh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-sem-ops
        privileged        512       -   deny                                 -
        system          2,15G     max   deny                                 -
pressy@mp-wst01 # exit
root@mp-wst01 # projmod -a -K "process.max-sem-ops=(priv,1024,deny)" user.pressy
root@mp-wst01 # su - pressy 
pressy@mp-wst01 #
pressy@mp-wst01 # prctl -n process.max-sem-ops $$
process: 16574: -ksh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-sem-ops
        privileged      1,02K       -   deny                                 -
        system          2,15G     max   deny                                 -
pressy@mp-wst01 #

should work....

regards PRESSY
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Semaphores Laxxi Solaris 0 02-09-2012 12:05 AM
semaphores joker40 UNIX for Dummies Questions & Answers 3 11-07-2010 06:13 PM
How many semaphores? Watto86 UNIX for Advanced & Expert Users 8 11-08-2007 12:32 AM
Semaphores with key of 0 doeboy UNIX for Advanced & Expert Users 0 10-28-2004 03:41 PM
Semaphores joseph_shibu Programming 1 11-01-2001 12:01 PM



All times are GMT -4. The time now is 03:16 AM.