[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux VM Question



On 9/4/06, pandari kashyap <pandari.kashyap@xxxxxxxxx> wrote:
Thank you for your reply. So are you telling me that user mode processes (A
and B) have the same set of possible linear address spaces ( 0 to 4GB). For
example more realistically A has address space beginning at address 24 and
ending at address 124 and B also has address space beginning at 24 and
ending at 124.


Yes, this can be the case


Let us say that A and B are 2 completely different processes. When either A
or B accesses, for example, address 30 then how does kernel resolve it to
the correct physical address?.

Because all the kernel has, at this point in time, is linear address 30 and
nothing else? Can you explain more? I appreciate your help


The linear/virtual address translation to physical address is done through page-tables and each process has its own page-table. So at context-switching time the process's (which is going to execute) page-table base address is loaded and then the linear/virtual address points to a new physical address currently in use by process.

For getting linear/virtual to physical address translation you can
consult Intel's x86 System Programming Manual or read a good operating
systems book.

--
Fawad Lateef

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/