Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

What makes having an array of pointers to page table entries better than having an array of page table entries?

$
0
0

Here in this lecture, some extreme implementations of a page table are discussed as well as some reasonable ones.

One of the extreme cases was to allocate a flat array that maps every possible virtual address to a physical address.

At the minute 19:19 (which the given link will start at), the lecturer says that he's talking about a flat array of pointers to PTEs. And then mentions that he could've done something even more stupid which is to use an array of actual page table entries.

Why would having an array of pointers to PTEs be better that having an actual array of PTEs?

He is talking about a 32 bit system with an address of 4 bytes, But PTE is also 4 bytes.

Isn't having an array of pointers more wasteful because it'll take double the space (4 bytes for the pointer and 4 for the PTE)?

Also, I believe that allocating a lot of PTEs that're spread across the physical memory would cause fragmentation and will be hard to manage, as opposed to creating just an array of PTEs which will be one chunk of memory that does not need a lot of management.

Why would having an array of pointers be a better case?


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>