public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hong Hsu <honghsu@bellatlantic.net>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Patrick Ouellet <patrick.ouellet@microtecsecurite.com>,
	Kernel Mailing lists <linux-kernel@vger.kernel.org>,
	kernelnewbies@nl.linux.org
Subject: Re: basic questions of memory management
Date: Fri, 26 Oct 2001 12:41:23 -0400	[thread overview]
Message-ID: <3BD99233.592D297A@bellatlantic.net> (raw)
In-Reply-To: <Pine.LNX.4.33L.0110251356150.3690-100000@imladris.surriel.com>

Rik van Riel wrote:

> On Thu, 25 Oct 2001, Patrick Ouellet wrote:
>
> > As a follower of linux for a couple of years now
> > I wanted to go deeper into the madness,
> > so I said to myself, why no go as deep as you
> > can and get yourself into the Kernel.
> >
> > My simple question is this:
> >
> > Were should I start.
>
> A good place to start would be  http://kernelnewbies.org/
> and also the kernelnewbies mailing list and IRC channel.
>
> > I would like to have a nice overview of the kernel
> > something that would help me understand all the part
> > of the kernel and how they work toghether.
>
> The book "Understanding the Linux Kernel" by O'Reilly
> is nice, also see http://kernelnewbies.org/books.php3
>
> regards,
>
> Rik

    Rik,

    I have basic questions regarding virtual address space and memory
management, wondering you can give a help.

1.   When userland process is created, how big the size of virtual
address space the kernel assign to it,  4GB or it depends on size of the
executable code?  If 4GB is used, why is that because 3GB of it will be
used excessively for the process and it is huge for most of programs.

2.  Upon the creation of a userland process, a Page Table and a Page
Directory will be created in main memory and stay there until the
process is terminated.  Besides that the /proc will have corresponding
subdirectory for the process.  Does the virtual address space has a copy
of executable code on the secondary memory, usually on hard disk, or it
just contains tables which holds addresses of  executable code?  Having
a copy of every executable code on hard disk could take a lot of space
if 3GB is used for each.

3.  If I have enough main memory,  I notice that the size of swap
(maximum is 128 MB) always zero.  Does that means no virtual address
space on hard disk?

4.  In Windows 98/ME, upon the termination of a userland process, this
portion of occupied main memory doesn't get released, instead the main
memory still hold contents of processes until page fault handler forces
it out.  Does Linux kernel use similar approach.  If so, how these
contents of processes in main memory can be reused assume same program
starts to run again as the Page Table and Page Directory are gone?

5. In your 'Memory Management Talk', you mentioned the main memory is
very slow.  As speed of Intel processor grows rapidly, speed difference
between cpu and main memory is getting big and bigger.  How the issue
could be solved in future?  Does RAM reached its limitation of speed
theoretically or L2 cache reached its limitation in terms of cost and
size?

Maybe I confuse some concepts here.   Thanks you for the help,
-Hong
honghsu@bellatlantic.net




  parent reply	other threads:[~2001-10-26 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-25 15:32 In great need Patrick Ouellet
2001-10-25 15:58 ` Rik van Riel
2001-10-25 18:52   ` Daniel Phillips
2001-10-25 19:37     ` EvilTypeGuy
2001-10-25 19:45       ` Jonathan Corbet
2001-10-25 19:54         ` Tahar
2001-10-25 20:08         ` EvilTypeGuy
2001-10-25 20:13           ` Robert Love
2001-10-26 16:41   ` Hong Hsu [this message]
2001-10-25 16:34 ` Jonathan Corbet
2001-10-25 20:10   ` Daniel Phillips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BD99233.592D297A@bellatlantic.net \
    --to=honghsu@bellatlantic.net \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrick.ouellet@microtecsecurite.com \
    --cc=riel@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox