Re: Kernel Virtual Memory

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

 



On 10/15/05, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
> hello...
>
> > how come the kernel has a virtual memory, too ? like a process ?
> because kernel (after init stage is passed and fully operated) works in
> x86 protected mode (here we talk strictly about x86). every memory
> access is done via this phase:
> logical address-->virtual addr--> physical
>

I think its like

Segmentation
Virtual Address ------------> Linear Address
--------------------------> Physical Address

> So, in other word, if kernel try to access memory in protected mode, it
> issues virtual address...and MMU will translate it into physical
> address. Virtual memory itself is a result of segmentation plus
> paging....two basics mechanism that provides clue to MMU on how to turn
> virtual address into physical address.
>

Yes, but Linux Kernel don't make use of segmentation and as x86 must
requires segmentation so kernel makes all segments to lie at 0 Address
....


> And yes, kernel do have its own page table...it is referred  by so
> called "master kernel page global directory"...this is the same page
> tables that define the upper (>3GB) process address space (in 3G/1G VM
> split). It is built on early phase of kernel init. Check out
> startup_32().
>

And I want to mention that the page tables exists only in kernel and
user space memory requirements and management is done by the kernel
.....

>
> > isn't the kernel just a bunch of asynchronous functions,
> > working without a memory descriptor ?
> What do you mean by "without  memory descriptor"?
>

I think Roy wants to ask kernel processes don't have task->mm ?? Its
true, kernel processes/tasks don't have mm just b/c they don't need
them as kernel task can access all the available physical memory in
the system so it just uses the previous tasks mm when switching to the
kernel task .....

--
Fawad Lateef

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



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux