Help with multplexed file limit

utzoo!decvax!ittvax!swatt utzoo!decvax!ittvax!swatt
Thu Apr 21 16:03:35 AEST 1983


I'm not sure what emacs requires from MXP files.  If you're interested
in just increasing the number of MPX files that may exist at one time,
then:

	in mx.h:

	#define	NGROUPS	60	/* number of mpx files permitted at one time */
	#define	NCHANS	100	/* number of channel structures */
	#define	NPORTS	100	/* number of channels to i/o ports */
	#define	CNTLSIZ	10
	#define	NLEVELS	4
	#define	NMSIZE	50	/* max size of mxlstn file name */

I don't recall exactly what the relationship between GROUPS and CHANS
is, but I think GROUP is the total number of MPX files, and CHANS is
the total number of processes attached to MPX files.  One file with a
master process and a single process opening the other end would
therefore require 1 GROUP and 2 CHANS.  PORTS affect only the case of
joining MPX files to tty devices.

Note also the several-times mentioned bugs with mx2.c which will cause
directories to get scribbled on sometimes.  A modified source has been
posted twice.

Changes to increase the number of processes attached to a given MPX
file affects pretty much the entire kernel, as it changes the size of
the in-core inode structure.  You also need to change NINDEX in
"inode.h".  We did that from 6 to 15.

	in inode.h:

	#define	NINDEX	15

Will allow up to 15 processes to open an MPX file, however, just
increasing NINDEX is not the way MPX files were intended to be used.
What you're supposed to do is:

	master = mpx ("", 0666);
	sub = mpx ("node1", 0666);
	join (sub, master);
	sub = mpx ("node2", 0666);
	join (sub, master);
	sub = mpx ("node3", 0666);
	join (sub, master);

	<and so on>

This will give you "node1", "node2", ..., which are all "joined" to the
master node, which is nameless.  Each sub-node may be opened by as many
as NINDEX processes.  Operations on any of these sub nodes will be
handled by the process behind the master node.

You may nest nodes to the level of 4.  The MPX "id" is a 16-bit number,
consisting of 4 4-bit nibbles, one for each level in the tree.  Each
nibble is a number 0-14 identifying one of 15 channels at that level.
You can't increase NINDEX past 15 as the number 15 is reserved for an
illegal channel number.

Thus the number of channels you can have on a one-deep tree is NINDEX;
the number at a two-deep tree is NINDEX^2; and so on.  The whole number
is limited by the global parameters from mx.h

	- Alan S. Watt (who learned it the hard way ...)
	{decvax,duke,purdue,lbl-csam}!ittvax!swatt



More information about the Comp.unix.wizards mailing list