[mod.unix] Unix Technical Digest V2 #9

netnews@wnuxb.UUCP (Heiby) (06/11/85)

Unix Technical Digest       Tue, 11 Jun 85       Volume  2 : Issue   9

Today's Topics:
                       > 8Mb real memory on 4.2
                      interleaved memory on 780s
               what does "not enough core" really mean?
----------------------------------------------------------------------

Date: Wed, 5 Jun 85 21:23:47 edt
From: Chris Torek <seismo!maryland.ARPA!chris>
Subject: > 8Mb real memory on 4.2

Well, if you can wait, 4.3 (when/if it gets announced) has pushed the
bits up to handle 64Mb.  However, if you want to go ahead now, I
believe that the only changes required are to the bit fields and to the
Fastreclaim code in locore.s (if you have someone's net.bugs.4bsd
fixes---I forget who---then changing cmap.h will be sufficient).

Here's the top of our (actually BRL's) cmap.h.  Note the ``bit
offsets'' definitions under #else LOCORE; they are what is used in
locore.s (after it's been fixed up).

/*	cmap.h	6.3	84/02/07	*/

/*
 * core map entry
 *
 * Limits imposed by this structure:
 *
 *		limit		     cur. size		fields
 *	Physical memory+		64 Mb	c_next, c_prev, c_hlink
 *	Mounted filesystems		255	c_mdev
 *	size of a process segment	1 Gb	c_page
 *	filesystem size			2 Gb	c_blkno
 *	proc, text table size		1024	c_ndx
 *
 *	+ memory can be expanded by converting first three entries
 *	to bit fields, shrinking c_unused, and increasing MAXMEM below.
 */
#ifndef	LOCORE
struct cmap
{
unsigned short 	c_next,		/* index of next free list entry */
		c_prev,		/* index of previous free list entry */
		c_hlink;	/* hash link for <blkno,mdev> */
unsigned char	c_unused;	/* fill, expansion for above */
unsigned int	c_mdev:8,	/* which mounted dev this is from */
		c_lock:1,	/* locked for raw i/o or pagein */
		c_want:1,	/* wanted */
		c_intrans:1,	/* intransit bit */
		c_free:1,	/* on the free list */
		c_gone:1,	/* associated page has been released */
		c_type:2,	/* type CSYS or CTEXT or CSTACK or CDATA */
		c_page:21,	/* virtual page number in segment */
		:4,		/* to longword boundary */
		c_blkno:22,	/* disk block this is a copy of */
		c_ndx:10;	/* index of owner proc or text */
};
#else	LOCORE
/*
 * bit offsets of elements in cmap
 */
#define	C_INTRANS	66
#define	C_FREE		67
#define	SZ_CMAP		16		/* sizeof(struct cmap) */

#define	MAXMEM		64*1024		/* maximum memory, in Kbytes */
#endif	LOCORE


Chris

------------------------------

Date: Wed, 5 Jun 85 21:31:23 edt
From: Chris Torek <seismo!maryland.ARPA!chris>
Subject: interleaved memory on 780s

There is a hardware register on the controller that needs to have a bit
set (the hardware manuals should say just which bit).  You have to
figure out the physical address of the controller (20000000 plus 2000
times the nexus number I think, but it's been a while, and someone took
our last copy of the red book) and add the offset to that register.
Then a D/P command in DEFBOO.CMD (and RESTAR.CMD) will turn it on for
normal reboots.  You probably also want to put it in RASBOO.CMD and
RAMBOO.CMD.

You ought to be able to get the info from DEC; the interleave works the
same for Unix and VMS....

Chris

------------------------------

Date: Wed, 5 Jun 85 16:37:18 edt
From: allegra!phri!roy (Roy Smith)
Subject: what does "not enough core" really mean?

	When our 4.2 bsd 11/750 is heavily loaded, we often get "not
enough core" messages from the shell when trying to run a program.
However, when I run vmstat, and ps, I often see relatively small amounts
of active virtual memory and large amounts of free memory.

	We have 4 Mbyte of main memory and a single 30 Mbyte swap
partition.  In the sample output above, there are several large
processes waiting for tty input, so don't let the high idle percentages
fool you.

	Can somebody please explain just what the 'avm' and 'fre'
columns really mean, and how they affect how many jobs we can have
running at one time.

For example (long):

 procs     memory                       page      disk  faults          cpu
 r b w   avm  fre  re at  pi  po  fr  de  sr r0 x1 x2 x3  in  sy  cs us sy id
 1 0 0  1160 1099   0  0   0   0   0   0   0  2  0  0  0   5  24   8 12  9 79
 0 0 0  1095 1077   0  0   0   0   0   0   0  0  0  0  0   2 121   5  6  3 91
 1 0 0  1073 1069   0  0   0   0   0   0   0  0  0  0  0   2  62   3  2  5 92

USER       PID %CPU %MEM   SZ  RSS TT STAT  TIME COMMAND
roy       1216 56.5  2.8  155   93 13 R     0:02 ps augx
roy       1215 15.0  0.7  101   18 13 S     0:00 csh -c ps augx
roy       1194 11.4  4.9  564  162 13 S     0:42 /usr/bin/EMACS /tmp/Re01193
jeanie    1201  4.5  4.0  558  131 hd S     0:09 EMACS
root        66  0.3  0.2   22    3 ?  S    14:24 /etc/update
root        99  0.1  0.9   64   28 ?  I     7:56 /etc/rwhod
root         0  0.1  0.1    0    0 ?  D     1:33 swapper
root        69  0.0  0.5   31   12 ?  I     5:30 /etc/cron
root        74  0.0  0.6   51   17 ?  S     0:34 /etc/comsat
jeanie    1202  0.0  0.7  101   20 hd I     0:00 EMACS
jeanie   29949  0.0  0.9  111   26 hd I     0:10 -csh (csh)
root         1  0.0  0.3   31    7 ?  I     2:13 init
roy        747  0.0  1.0  113   28 13 I     0:05 -csh (csh)
roy       1193  0.0  3.1  167  101 13 I     0:00 mail allegra!cbosgd!unix
roy       1195  0.0  0.8  102   21 13 I     0:00 EMACS /tmp/Re01193
marzec    1189  0.0  4.3  554  142 10 I     0:02 EMACS rmdsrcha.f
marzec    1190  0.0  0.7   99   20 10 I     0:00 EMACS rmdsrcha.f
root      1192  0.0  0.4   32    8 i4 I     0:00 - 2 (getty)
root      1186  0.0  0.4   32    8 15 I     0:00 - f (getty)
root        36  0.0  0.5   65   11 ?  S     0:07 /etc/routed
marzec     275  0.0  0.8  109   24 10 I     0:12 -csh (csh)
root      1173  0.0  0.4   32    8 h3 I     0:00 - 2 (getty)
davis     1120  0.0  4.1  556  135 h6 I     0:28 EMACS Helin2
reisberg  1087  0.0  5.1  560  168 h5 T     0:06 EMACS qsteven.f
reisberg   762  0.0  0.9  110   25 h5 I     0:05 -csh (csh)
root      1125  0.0  0.4   32    8 04 I     0:00 - 2 (getty)
davis     1108  0.0  0.8  109   24 h6 I     0:03 -csh (csh)
davis     1121  0.0  0.7   99   20 h6 I     0:00 EMACS Helin2
reisberg  1088  0.0  0.7  100   20 h5 T     0:00 EMACS qsteven.f
root     29502  0.0  0.0   32    0 09 IW    0:00 - 2 (getty)
root       855  0.0  0.4   32    8 11 I     0:00 - 6 (getty)
roy      23843  0.0  1.0  113   28 14 I     0:06 -csh (csh)
root       930  0.0  0.4   32    8 h7 I     0:00 - 2 (getty)
root       108  0.0  0.0   32    0 08 IW    0:00 - c (getty)
root        45  0.0  0.0   53    0 ?  IW    0:00 /etc/talkd
root     24097  0.0  0.0   32    0 06 IW    0:00 - 7 (getty)
root      1073  0.0  0.4   32    8 h2 I     0:00 - 2 (getty)
root     23059  0.0  0.0   32    0 05 IW    0:00 - 2 (getty)
root       116  0.0  0.0   32    0 h0 IW    0:00 - 2 (getty)
root     23463  0.0  0.0   32    0 02 IW    0:00 - 2 (getty)
root        91  0.0  0.0   57    0 ?  IW    0:00 /etc/rshd
root        42  0.0  0.0   77    0 ?  IW    0:00 /etc/ftpd
root        92  0.0  0.0   55    0 ?  IW    0:00 /etc/rexecd
root       996  0.0  0.4   32    8 12 I     0:00 - 7 (getty)
root       117  0.0  0.0   32    0 h1 IW    0:00 - 2 (getty)
root        94  0.0  0.0   52    0 ?  IW    0:00 /etc/rlogind
daemon      50  0.0  1.0   64   30 ?  I     1:25 /etc/syslog
lusty    24372  0.0  0.8  109   24 i6 I     0:04 -csh (csh)
root      9560  0.0  0.0   32    0 hf IW    0:00 - z (getty)
root       137  0.0  0.0   32    0 i7 IW    0:00 - f (getty)
root        81  0.0  0.0   81    0 ?  IW    0:00 /usr/lib/lpd
root       135  0.0  0.0   32    0 i5 IW    0:00 - f (getty)
root       102  0.0  0.0   32    0 01 IW    0:00 - 2 (getty)
root     23396  0.0  0.0   32    0 i3 IW    0:00 - 2 (getty)
casper   27480  0.0  0.8  109   24 i2 I     0:06 -csh (csh)
root       131  0.0  0.0   32    0 i1 IW    0:00 - 2 (getty)
root       161  0.0  0.0   31    2 ?  IW    0:00 init
root       887  0.0  0.4   32    8 hb I     0:00 - 2 (getty)
root       104  0.0  0.0   32    0 03 IW    0:00 - 2 (getty)
root         2  0.0  0.3 1024    0 ?  D     0:14 pagedaemon
root      1060  0.0  0.1    0    0 hd Z     0:00 <exiting>
root     24142  0.0  0.0   32    0 i0 IW    0:00 - 7 (getty)
roy        374  0.0 13.5 5685  423 14 I N  12:21 fastn
root       128  0.0  0.0   32    0 he IW    0:00 - 2 (getty)
root     27175  0.0  0.0   32    0 co IW    0:00 - 4 (getty)
root       948  0.0  0.4   32    8 00 I     0:00 - 2 (getty)
root        59  0.0  4.3  162  146 ?  I     0:25 /usr/lib/sendmail -bd -q1h
root       120  0.0  0.0   32    0 h4 IW    0:00 - 2 (getty)
root     29911  0.0  0.2   31    3 ?  I     0:00 init
root        39  0.0  0.0   57    0 ?  IW    0:00 /etc/telnetd

allegra!phri!roy (Roy Smith)
System Administrator, Public Health Research Institute

------------------------------

End of Unix Technical Digest
******************************
-- 
Ronald W. Heiby / netnews@wnuxb.UUCP | unix-request@cbosgd.UUCP
AT&T Information Systems, Inc., Lisle, IL  (CU-D21)