From owner-freebsd-hackers@FreeBSD.ORG  Wed Jul 30 12:24:28 2008
Return-Path: <owner-freebsd-hackers@FreeBSD.ORG>
Delivered-To: freebsd-hackers@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DF5681065675
	for <freebsd-hackers@freebsd.org>; Wed, 30 Jul 2008 12:24:28 +0000 (UTC)
	(envelope-from ml.freebsd.hackers@gmail.com)
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232])
	by mx1.freebsd.org (Postfix) with ESMTP id BBC868FC16
	for <freebsd-hackers@freebsd.org>; Wed, 30 Jul 2008 12:24:28 +0000 (UTC)
	(envelope-from ml.freebsd.hackers@gmail.com)
Received: by rv-out-0506.google.com with SMTP id b25so498028rvf.43
	for <freebsd-hackers@freebsd.org>; Wed, 30 Jul 2008 05:24:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:mime-version:content-type;
	bh=YDIZimpyKtYfNXeFnvg3XikNLcadPByUSS4XIO7pcyU=;
	b=Lq3++hoAoH0yoc1FJvP92pbJBAN6G/09K4BFjAeGkIqqgaAigOYDjgAVqWHNnEz0El
	HL9ixSC8raLtssQHkaeh2E316fOQGkGp6C4T1HgZO9VzsQJhQp0gkCUkzkVluqTlLuhB
	RK1DTtEE6H7OZxDTS+gstjhrlVOMIc2F7O2Sk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:mime-version:content-type;
	b=uKe/MiXtq6q+EVDmWN/o+VzdCFpT7PNFTON90vRFrBM1rl72TsV/Ov7iaLpuVGm6NL
	nIxTkkq8+98gX3JsC4mDeppGoALJpwn8f4/W1BjbSNYEFAt6b0z4/hEnHD3pkxUdBuZq
	h29IwPLh3oyUik1xp+5ELuGIfBdK+kJv9ZQzo=
Received: by 10.141.28.4 with SMTP id f4mr4136972rvj.35.1217419194824;
	Wed, 30 Jul 2008 04:59:54 -0700 (PDT)
Received: by 10.141.115.8 with HTTP; Wed, 30 Jul 2008 04:59:53 -0700 (PDT)
Message-ID: <591f70e00807300459j74aac11eob0bea7cdf4b4dcd4@mail.gmail.com>
Date: Wed, 30 Jul 2008 07:59:53 -0400
From: "FreeBSD Hackers" <ml.freebsd.hackers@gmail.com>
To: "FreeBSD Hackers" <freebsd-hackers@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Content-Filtered-By: Mailman/MimeDel 2.1.5
Subject: General questions about virtual memory
X-BeenThere: freebsd-hackers@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Technical Discussions relating to FreeBSD
	<freebsd-hackers.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, 
	<mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers>
List-Post: <mailto:freebsd-hackers@freebsd.org>
List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>,
	<mailto:freebsd-hackers-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Jul 2008 12:24:29 -0000

Hi, all.  I apologize for not posting a question specific to FreeBSD (I'll
study about that later), but I'm looking for some help understanding a few
things and I don't know where else to turn.  Using FreeBSD to give me
concrete examples of how certain things work is okay, since I do use FreeBSD
and I intend to read and study books covering the design and implementation
of FreeBSD.

I recently picked up one of my old college textbooks, "Modern Operating
Systems" (Tanenbaum, an older edition, but I'm not sure which one since the
book is at home and I am not) with a strong desire to read it cover-to-cover
and get a solid foundation of the concepts described therein.  The chapter
on virtual memory has left me with some questions, and if anyone would be
willing to help me understand (either on or off list) a few things that
aren't clear, I would very much appreciate it.

Examples of some specific questions that I have include:

WRT translation of virtual addresses to physical addresses, where does the
hardware stop and the software begin?  Explanation: who determines the
format of the page tables (CPU or OS)?  Who populates and maintains the page
tables?  Where does the translation lookaside buffer reside?  Who maintains
the TLB?

Also WRT page tables, how does the OS and the MMU adjust for different sizes
of physical RAM?  Wouldn't the page tables for a system with 512 MB of RAM
will be fewer than the page tables for a system with 2 GB of RAM?  How does
the CPU know how many page table entries there are?

I have a few more questions, but for starters this is the kind of
information I'm seeking.  I'm just not getting a clear enough picture from
the textbook I'm reading now.  (It makes me wish I was still in college so I
could dump my questions on my college professor. :)

If anyone is willing to help me understand this, I would greatly appreciate
it.  I would also value your input if there are other resources (people,
mailing lists, books, web pages, etc.) that you want to recommend instead of
taking some time to help teach me.

Thank you,

Kevin