What is the essence of using multi-level virtual memory page tables? The goal is to reduce the cost of physical memory to store information about pages, because, for example, about 4 GB of physical memory with a page size of 4 KB will require about 1 million entries in PTE. I read somewhere that to solve this problem as well, the page tables are not stored in real, but in virtual memory themselves become objects of the paging organization. Are these two ideas connected together?

It is not clear how we can make some sort of saving from breaking records about pages by directories ... If I scatter files on a pile of subfolders, the resulting size will only increase, because You will also have to store information about directories. It would be another matter if some directories were uploaded to a disk and information about this directory indicated that it was unloaded onto a disk. But this is not how it happens.

    1 answer 1

    The essence of the idea is that with multi-level translation, we do not need a continuous piece of memory.

    By the way, all the β€œhot” broadcasts are stored in the so-called TLB (translation lookaside buffer) (usually this is a small, fully associative memory). Therefore, the majority of broadcasts occur within 1 processor cycle without access to the address translation tables in memory at all.

    • And how are PTE records added to a TLB? - D .Stark
    • "The idea is that with multi-level translation, we do not need a continuous piece of memory." - Please explain. - D .Stark
    • Are the least used page tables uploaded to disk to save space? - D .Stark
    • А ΠΏΠΎ ΠΊΠ°ΠΊΠΎΠΌΡƒ ΠΏΡ€ΠΈΠ½Ρ†ΠΈΠΏΡƒ записи PTE Π΄ΠΎΠ±Π°Π²Π»ΡΡŽΡ‚ΡΡ Π² TLB? - if there is an entry in the translation table, then the MMU hardware (usually the LRU variants (replacing the oldest)) deals with this, if not - the OS receives a page fault , adjusts the translation table and disables one (or several, depending on the algorithms) TLB records in TLB - avp
    • Π’Ρ‹Π³Ρ€ΡƒΠΆΠ°ΡŽΡ‚ΡΡ Π»ΠΈ Π½Π°ΠΈΠΌΠ΅Π½Π΅Π΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌΡ‹Π΅ Ρ‚Π°Π±Π»ΠΈΡ†Ρ‹ страниц Π½Π° диск Ρ€Π°Π΄ΠΈ экономии мСста? - I do not know (obviously, it depends on the OS). (If we send the whole process to swap, then I would displace). You can see the Linux code yourself in github - avp