Kernel Memory

HowKernel StuffWorks howkernelstuffworks at gmail.com
Thu Jun 21 09:35:17 EDT 2012


Hi,
  I am a kernel newbie too, Kernel memory is not pagable, because kernel
itself is responsible for paging. See this discussion,
http://kerneltrap.org/node/6404

  Paging happens for regular processes, i.e each process memory is divided
into a page of certain size(4kb in Linux), so it can swap for another page
that might be needed for that particular moment, it usually replaces an
page that have not been used for long time(see LRU,internal fragmentation).
Kernel is a process too, just like anyother process, but it differs from
others because it directly talks to the hardware and also it is the one
which takes care of paging and LRU algo's. So it does not make much sense,
for a kernel memory to be pageable, because, if it removes the page that
contains that has the paging algorithm, then there is  no way to come back,
you want to retrieve a page from disk_swap_area, but you cannot, because
the page that contains code to retrieve the instructions are paged :)...
This is not just for paging, since kernel controls everything, it is not
advisable to put its own code in swap area(see, virtual memory, virtual
memory = physical memory + swap space).

BTW, i am a kernel newbie too, this is my basic understanding, please feel
free to correct it, if I am wrong....

On Thu, Jun 21, 2012 at 8:27 AM, Vijay Chauhan <kernel.vijay at gmail.com>wrote:

> Hello,
>
> I am newbie.
> It has been said "kernel memory is not pageable"
> What does it mean? There is no concept of kernel virtual address?
>
> Any simple explanation will help me to udnerstand.
>
> Thanks,
> Vijay
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120621/282abbb9/attachment-0001.html 


More information about the Kernelnewbies mailing list