1
votes

An operating system itself has resources it needs to access, like block I/O cache and process control blocks. Does it use virtual memory addresses or physical memory addresses?

I feel like it should be the former since it prevents the need to keep a large area of physical memory for a purpose, even when it is mostly empty. The mechanism of page tables/virtual memory would do a much better job at keeping those resources that the OS really needs.

So which is it?

1
Most non-trivial OS use an area of non-swapped physical memory for those requirements that must not be paged out, eg. the lower-half of drivers that must be there upon an interrupt.Martin James

1 Answers

1
votes

10 randomly selected operating systems will do virtual memory management in 10 different ways. There's no answer that applies to all operating systems.

Some (e.g. MS-DOS) don't support or use virtual memory management for anything, some (e.g. Linux) just map all of physical memory into kernel space and don't bother using virtual memory management tricks for the kernel itself (it's almost as if the kernel is in physical memory even though it's technically both), and some may do any number of virtual memory tricks in kernel space.