Question 78: Kernel also requires memory for storing its code and various other segments, processes specific data etc. How should this kernel memory be implemented?
- Same as user process i.e. Virtual memory because kernel is just like another process.
- Same as user process i.e. Virtual memory because VM system provides easy security and sharing mechanism.
- It should not be implemented as virtual memory because kernel pages shouldn’t be swapped out as they are critical to system’s working.
- It should not be implemented as virtual memory because kernel pages shouldn’t be intermingled with processes pages. It requires separate contiguous memory.
Solution: Kernel pages perform critical functions and shouldn’t be swapped out. Example, page fault handler is part of kernel, if the code for it is not itself present in memory and a page fault occurs for some user process then there is no way to deal with it. Hence, the correct answer is option 3.