OS & Hardware
Many OSes map the kernel into part of every process's address space (for example the upper range) and forbid user-mode access through page-table protection bits. What is the main advantage of this layout?
- AEntering the kernel needs no address-space switch
- BApplications can call kernel functions directly without system calls
- CEvery process can freely modify and share kernel memory
Show answer and explanation
Answer: A. Entering the kernel needs no address-space switch
Mapping the kernel identically into every process lets system calls and interrupts reach kernel code and data immediately without switching page tables or flushing the TLB. User-mode access is forbidden by the page-table protection bits, so applications cannot call kernel functions directly or modify kernel memory. A breach of this protection would be a serious vulnerability.
- A. Correct. Entering the kernel needs no address-space switch.
- B. Protection bits forbid it, so kernel functions cannot be called directly.
- C. User mode cannot modify kernel memory.