Sunday, March 8, 2015

Kernel Address Space

Translating a virtual address to the physical address requires looking up of page tables.  To speed up translation, server will usually equipped with a TLB (translation lookaside buffer).  When a process is switched out to another process, the TLB will need to be flushed.  Context switching also happens in system call.  Some hardware architecture (e.g. SPARC) will have assist to preserve the TLB and some have not (e,g x86).  For the former, the kernel address space could be a separate address space from the user process.  For the latter, the entire virtual address space will partition into a kernel part and a user part.  Mapping the kernel space in the same address space as the user help to minimize the flushing of TLB during system call.

No comments: