Score:0

Where does Ubuntu stores page tables?

th flag

Per the kernel Documentation

pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow userspace programs to examine the page tables and related information by reading files in /proc.

However, when I ran this command when the process 13883 is running on Ubuntu 18.04.4 LTS

ll /proc/13883/pagemap

I got

-r-------- 1 ubuntu ubuntu 0 Dec 20 18:05 /proc/13883/pagemap

which seems to indicate that Ubuntu stores the info somewhere else, if yes, then where is it?

Another interesting observation is that /proc/13883/maps also appears to be size of zero though, there's actually a table in there.

...
7ffd62dd7000-7ffd62df8000 rw-p 00000000 00:00 0                          [stack]
7ffd62df9000-7ffd62dfc000 r--p 00000000 00:00 0                          [vvar]
7ffd62dfc000-7ffd62dfe000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall] 
cn flag
Possible duplicate of https://askubuntu.com/questions/1112177/proc-directory-stored-in-a-ram-or-hard-drive
Score:4
us flag

Many "files" in /proc are merely a file-like interface to kernel APIs, and don't actually exist on disk. Try cat on those files, and the kernel will generate information on the fly and you'll see output. Since the information is generated when needed, these files don't have a meaningful "size".

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.