[comp.unix.aix] AIX 3.1 Kernel Size

eddjp@edi386.UUCP ( Dewey Paciaffi ) (02/07/91)

I've run the 'size' command on /unix, and it responds that my kernel 
is 20.5 MB in size. I understand that the kernel pages, but was just curious
to know if this number is actually correct?
-- 
Dewey Paciaffi           ...!uunet!edi386!eddjp

jfh@rpp386.cactus.org (John F Haugh II) (02/08/91)

In article <147@edi386.UUCP> eddjp@edi386.UUCP ( Dewey Paciaffi ) writes:
>I've run the 'size' command on /unix, and it responds that my kernel 
>is 20.5 MB in size. I understand that the kernel pages, but was just curious
>to know if this number is actually correct?

Yes, it is "correct", however, it is a paging kernel and much of that
space is large tables that are unused until you need them.  It doesn't
mean the same thing it does with any other UNIX-derivative.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh@rpp386.cactus.org
"I've never written a device driver, but I have written a device driver manual"
                -- Robert Hartman, IDE Corp.

rick@ulticorp.UUCP (Rick Poleshuck) (02/09/91)

In article <19039@rpp386.cactus.org> jfh@rpp386.cactus.org (John F Haugh II) writes:
>In article <147@edi386.UUCP> eddjp@edi386.UUCP ( Dewey Paciaffi ) writes:
>>I've run the 'size' command on /unix, and it responds that my kernel 
>>is 20.5 MB in size. I understand that the kernel pages, but was just curious
>>to know if this number is actually correct?
>
>Yes, it is "correct", however, it is a paging kernel and much of that
>space is large tables that are unused until you need them.  It doesn't
>mean the same thing it does with any other UNIX-derivative.

I am confused. We have a Model 520 with 16Meg of ram. Our size size
command also shows 20.5 Mb of .BSS ( uninitialized data space ). Even
the Unix kernel can't be using 20 megabytes of tables. I assume that
this memory MUST be used for disk cache buffers. Since real memory is
less than the buffer size AIX is paging cache buffers to disk???????
?????????
-- 
		| Email - !uunet!ulticorp!ultixrs!rick
Rick Poleshuck 	| Voice - (201) 887-9222 Ext. 755
		| Mail  - The Ultimate Corporation, East Hanover, NJ 07936

jfh@rpp386.cactus.org (John F Haugh II) (02/10/91)

In article <479@ulticorp.UUCP> rick@ulticorp.UUCP (Rick Poleshuck) writes:
>In article <19039@rpp386.cactus.org> jfh@rpp386.cactus.org (John F Haugh II) writes:
>>Yes, it is "correct", however, it is a paging kernel and much of that
>>space is large tables that are unused until you need them.  It doesn't
>>mean the same thing it does with any other UNIX-derivative.
>
>I am confused. We have a Model 520 with 16Meg of ram. Our size size
>command also shows 20.5 Mb of .BSS ( uninitialized data space ). Even
>the Unix kernel can't be using 20 megabytes of tables. I assume that
>this memory MUST be used for disk cache buffers. Since real memory is
>less than the buffer size AIX is paging cache buffers to disk?

I understand your confusion - AIX v3 is either the only UNIX-like kernel
that pages or one of very few.

There are various tables, the process table (struct proc) is one of them,
that are declared as having very large sizes.  If you check out the size
of the process table you will see that it is very large - on the order
of 262,144 entries (I forget the exact value).  All of that space is in
the .bss segment.  Since the kernel pages its own text and data pages,
the .bss segment doesn't exist until needed - the same as your user mode
program.  When a process table entry is referenced and the entry does not
exist, the system will catch a kernel mode page fault and allocate a page
to the process table.

Even many parts of the .text and .data segments are pagable.  It is quite
possible for a fairly small amount of the kernel to be "pinned" at any
given time.  So, when I said that the "size" command on the AIX kernel
doesn't mean anything particularly useful, I mean you have to thoroughly
understand how the system allocates it's memory and fully understand that
the size of the system as reported by various utilities is pretty
meaningless.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh@rpp386.cactus.org
"I've never written a device driver, but I have written a device driver manual"
                -- Robert Hartman, IDE Corp.