kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Virtual memory question
Date: Mon, 23 May 2011 12:26:45 +0700	[thread overview]
Message-ID: <BANLkTinjUCNgXU0qy9KMRG=7OcCbSpzigg@mail.gmail.com> (raw)
In-Reply-To: <274972.95837.qm@web137601.mail.in.yahoo.com>

Hi Naman....

On Mon, May 23, 2011 at 12:12, Naman shekhar Mishra
<namanshekharmishra2@yahoo.in> wrote:
> Is the last gigabyte in the virtual address space of each process mapped to
> the same memory location (which starts from the 2nd megabyte of physical
> RAM)?

I assume you're talking about 32 bits x86 system, with 3:1 vm split.

Well then, you're right. That last 1 GiB address space maps to same
place, that is kernel space.

>And, what happens when a process makes a >system call - does the kernel
> work on behalf of the process,

Yes

> i.e. use the process page tables, or uses its
> own page tables for virtual addressing. If the >former is true, when are the
> kernel page tables used?

when it says "on behalf", it means that it acts inside that process'
address space. However, the privilege is certainly lifted (CPL=0),
segmentation used now is a bit different, and so on and so on. And
since now it is likely calls codes in kernel space and accessing
kernel variables, for sure kernel page tables are needed to locate and
reference them.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

      reply	other threads:[~2011-05-23  5:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23  5:12 Virtual memory question Naman shekhar Mishra
2011-05-23  5:26 ` Mulyadi Santosa [this message]

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='BANLkTinjUCNgXU0qy9KMRG=7OcCbSpzigg@mail.gmail.com' \
    --to=mulyadi.santosa@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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;
as well as URLs for NNTP newsgroup(s).