0

I'm reading a textbook which shows virtual memory as: enter image description here

Linux also maps a set of contiguousvirtual pages (equal in size to the total amount of DRAM in the system) to the corresponding set of contiguous physical pages. This provides the kernel with a convenient way to access any specific location in physical memory

I am a little bit confused here. I think it refers to the second section "Physical memory". but what does it mean by it i is a convenient way to access any specific location in physical memory? if you want to access a specific location, cpu will still have to issue an instruction that has virtual address which can be used by TLB and then a physical address will be produced to access physical memory, so what the "physical memory" section is really for?

1 Answer 1

1

The section mapping physical memory really is intended as a convenient way to access physical memory. On architectures with this mapping, such as x86-64, accessing any physical address addr can be done by accessing the virtual address page_offset_base + addr.

Without this mapping, accessing a given physical address involves finding a mapping which contains it, or if there isn’t one, creating one. This is much more expensive.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .