linux - : Swapping in Paging (memory allocation)

标签 linux memory-management process linux-kernel paging

在操作系统类(class)中,我们的教授说

"when a page is no more necessary to be in the RAM it's taken in the swap-area of the memory. The Swap area is called like this for historical reasons, because it was used in a process called swapping, which involves the swap of a whole process. Indeed now we are taking in memory only one page, not an entire process."

这是正确的吗?我在网上找不到它!

最佳答案

是的,除了一(或两)件事外,这是非常正确的:页面在需要更多 RAM 时被换出,而不是在页面不再需要时被换出。当不再需要时,释放页面。

关于“swap”这个词:确实是一个历史名称,但是说“swap”还是正确的,因为页面是从“swap area”交换到“swap area”。

最后:整个进程可以驻留在 RAM 中,或者甚至只是其中的几页(或者根本没有!)。这取决于有多少 RAM 可用,以及操作系统如何分配可用内存。例如,参见 linux swappiness:这是一个简单的控件,告诉内核它必须如何处理 RAM 和交换空间。

关于linux - : Swapping in Paging (memory allocation),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41825795/

相关文章:

c# - 如何设置项目的可执行进程名?

c# - 有时间忽略 IDisposable.Dispose 吗?

python - 在Linux上编译的Python源代码

android - 运行与终端分离的 AVD 模拟器

c++ - 高效存储最多 2048 个字符的数组?

python - 我如何实现一个马尔可夫链,当它消耗太多内存时清除旧数据?

memory-management - Rust 会释放被覆盖变量的内存吗?

c++ - Fedora Linux 中的进程

linux - 在命令行和 Xargs 中批量重命名文件

python - linux下python读写LabView TDMS文件