Make your own free website on Tripod.com
SUN IPC Structures
1) Shared memory provides an extremely efficient means of sharing data between multiple processes
    on a Solaris system because the data need not actually be moved from one process's address space
    to another.
The Kernel maintains certain resources for the implementation of shared memory .Specifically , a shared
    memory identifier (shmid) is initialized and maintained by the operating system whenever a shmget(2)
    system call is executed successfully.The shmid identifies a shared segment,which has two components
    -- the actual shared RAM pages and a data structure that maintains information about the shared segment,
    the shmid_ds data structure.

 
 
Shared Memory Tunable parameters
Name Default Value Minimum Value Maximum Value Data Type Description
shmmax 1048576 1 4294967295(4
GB)
unsigned int Maximum size for a shared segment
shmmin 1 1 4294967295(4
GB)
unsigned int Minimum size for a shared segment
shmmni 100 1 2 GB signed int Max. number shared memory identifiers
shmseg 6 1 32 k short Max number shared segments per process

How to set in kernel? Edit /etc/system file "set shmsys:shminfo_shmmax=4294967295
 

2)Semaphores provide a means of synchronizing access to shared resources and are used quite often to
    synchronize  access shared memory segments by multiple processes inapplications.
    Semaphores provide a method of synchronizing access to a shareable resource by multiple processes.It
    can be used as a binary lock for exclusive access or as a counter ,allowing for multiple concurrent access
    to a finite number of shared resources,where the semaphore value gets initialized to the number of shared
    resources.Each time a process needs a resource ,the semaphore value gets decremented.When the process
    is done with the resource ,the semaphore value gets incremented .A semaphore value of zero indicates to
    the calling process that there are currently no resources available , and the calling process blocks until another
    process process finishes using the resource and frees it.
 
 
Semaphore Tunable Parameters
Name Default Value Maximum  Value Data type Description
semmap 10 2 GB signed integer Number of entries in semaphore map
semmni 10 65,536 signed integer Number of semaphore identifiers (sets)
semmns 60 2 GB signed integer Total number of semaphores system wide
semmnu 30 2 GB signed integer Total number of undo structures in system
semmsl 25 65,535 unsigned short Maximum number semaphores per semaphore ID(set)
semopm 10 2 GB signed integer Maximum operations for semop call
semume 10 2 GB signed integer Maximum undo entries per process
semusz 96 2 GB signed integer Total bytes reqd for undo structures,system wide
semvmx 32,767 65,535 unsigned short Maximum semaphore value
semaem 16,384 32,767 signed short Maximium adjust on exit value
Note that the maximum value listed is,in most cases,the largest value attainable based on the data type (e.g.,
2,147,483,647 for a signed integer).It is a theoritical limit, and should not be construed as a value of practical use
on a running production system.

3)Message queues are a means of doing asynchronous message passing between processes.Message queues
    allowed application developers to pass data around running processes in an ordered fashion.
 
 
Message Queue Tunable Parameters
Name Default Data Type Maximum Description
msgmap 100 signed int 2 GB Number of message map enteries
magmax 2048 signed int 2 GB Maximum message size
msgmnb 4096 signed int 2 GB Max bytes on message queue
msgmni 50 signed int 2 GB Max msg queue identifiers
msgssz 8 signed int 2 GB Message segment size
msgtql 40 signed int 2 GB Max message headers
msgseg 1024 unsigned short 32 k Max message segments
Note , the maximum value listed in the "Maximum" column is a value based on data type .It is a theoritical
maximum only, and should not be construed as something attainable on production systems.

**********************************************************************************************