[comp.unix.aix] Inter-process Commun. Limits, AIX 3.1

madhu@hubcap.clemson.edu (Max) (12/04/90)

Greetings:
	The structures msginfo , seminfo , shminfo are
depicted in <sys/*.h> in accordance to where they belong.
Are the limits in these set somewhere? Is there an lsattr
command to list the current setting of the limits that
appear in these structures (max. # shrd. mem id's, q id;s
etc..)? 

Is there a way of setting/resetting these limits on the run?
(Without restarting the system)

The fundamental question is how does AIX use the limits (is
something done at startup time with these limits, who does it
and why).

Thanks in advance for the info. (will summarize if there is
sufficient interest).

	Madhu Raman
	madhu@hubcap.clemson.edu

rudy@chukran.austin.ibm.com (12/05/90)

The AIX 3.1 kernel essentially hardcodes the limits to many kernel
structures.  WHen the structures are allocated at boot time, they
allocate  the whole thing in virtual memory.  However, the whole virtual
memory space is not mapped to real until the structure is referenced.
This happens a page at a time.  So, for instance, the process table is
2**17 entries, and virtual memory space is reserved for the whole thing.
But, if your system nevers runs more than 100 processes at once, then the
proc table has real memory allocated for 100 slots (rounded up to the next
page).  Whenever a table is accessed , in the fork system call in this example,
the index is checked against the maximum, and the system call fails.
So any system call which tries to allocate a new chunk of resource will have
that resource checked against the hardcoded maximum.  If the check passes, the
resource (proc table in this example) is referenced.  If it has to use a
new slot
in a page never reference before,  a page fault occurs and the real memory is
allocated at that time.  So, the tables are usually with very large limits
with no real memory wasted.

sem ids 	4K
max sems per ID	100K

max msg Q IDs	4K
max msg size	8K
max msg Q size	64K
max msgs per msg Q	8K 

Max shm IDs	4K
max concurrent shmattaches per process	10

*********************************************************************
IBM AIX Porting Center  | RSCS: CHUKRAN at AUSTIN 
11400 Burnet Rd.        | AWDnet: rudy@chukran.austin.ibm.com    
Internal ZIP 2830       | internet: chukran@austin.iinus1.ibm.com
Austin, Texas 78758     | Voice: 512-838-4674  Tieline: 678-4674
*********************************************************************

madhu@hubcap.clemson.edu (Max) (12/10/90)

In article <12055@hubcap.clemson.edu>, madhu@hubcap.clemson.edu (Max) writes:
> Are the limits in these set somewhere? Is there an lsattr
> command to list the current setting of the limits that
> appear in these structures (max. # shrd. mem id's, q id;s
> etc..)? 
 
Thank you Rudy For answering the question below:

> The fundamental question is how does AIX use the limits (is
> something done at startup time with these limits, who does it
> and why).

How could I get the system to tell me the Hard-Coded limits?
Thanks
Madhu Raman