(Usage hints for this presentation)
Computer Structures and Operating Systems 2023
Dr. Jens Lechtenbörger (License Information)
(Specifics of Linux are not part of learning objectives; however,
the following illustrates
shared memory,
and /proc
will be revisited in other presentations.)
/proc/<pid>/
/proc
is a pseudo-filesystem
<pid>
is meant as placeholder for such a number/proc
/proc
/proc
Figure © 2018 Julia Evans, all rights reserved; from julia's drawings. Displayed here with personal permission.
man
pages
Man pages are amazing
Figure © 2016 Julia Evans, all rights reserved; from julia's drawings. Displayed here with personal permission.
/proc/<pid>
/proc/<pid>/pagemap
: One 64-bit value per virtual page
/proc/<pid>/maps
: Mapped memory regions/proc/<pid>/smaps
: Memory usage for mapped regionssmem
smaps
files: smem
smem
Output$ smem -c "pid command uss pss rss vss" -P "bash|xinit|emacs" PID Command USS PSS RSS VSS 765 /usr/bin/xinit /etc/X11/Xse 220 285 2084 15952 1390 /bin/bash -c libreoffice5.3 240 510 2936 13188 826 /bin/bash /usr/bin/qubes-se 256 524 3008 13204 750 -su -c /usr/bin/xinit /etc/ 316 587 3368 21636 1251 bash 4864 5136 7900 26024 2288 /usr/bin/python /usr/bin/sm 5272 6035 9432 24688 1145 emacs 90876 93224 106568 662768
smem
Graph
This document is part of an Open Educational Resource (OER) course on Operating Systems. Source code and source files are available on GitLab under free licenses.
Except where otherwise noted, the work “OS08b: Virtual Memory with Linux”, © 2017-2022 Jens Lechtenbörger, is published under the Creative Commons license CC BY-SA 4.0.
In particular, trademark rights are not licensed under this license. Thus, rights concerning third party logos (e.g., on the title slide) and other (trade-) marks (e.g., “Creative Commons” itself) remain with their respective holders.