All of lore.kernel.org
 help / color / mirror / Atom feed
* Virtual memory question
@ 2011-05-23  5:12 Naman shekhar Mishra
  2011-05-23  5:26 ` Mulyadi Santosa
  0 siblings, 1 reply; 2+ messages in thread
From: Naman shekhar Mishra @ 2011-05-23  5:12 UTC (permalink / raw)
  To: kernelnewbies

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)? And, what happens when a process makes a system call - does the kernel work on behalf of the process, 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110523/4c3a634c/attachment.html 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Virtual memory question
  2011-05-23  5:12 Virtual memory question Naman shekhar Mishra
@ 2011-05-23  5:26 ` Mulyadi Santosa
  0 siblings, 0 replies; 2+ messages in thread
From: Mulyadi Santosa @ 2011-05-23  5:26 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-23  5:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23  5:12 Virtual memory question Naman shekhar Mishra
2011-05-23  5:26 ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.