operating-system - 使用虚拟内存进行上下文切换?

标签 operating-system virtual-memory mmu

最近我参加了操作系统类(class)的期中考试,其中一个问题是这样的-

以下哪些说法是错误的?

  1. 虚拟内存实现了程序地址空间到物理内存地址空间的转换
  2. 虚拟内存允许每个程序超过主内存的大小
  3. 虚拟内存提高了多道程序设计的程度
  4. 虚拟内存减少了上下文切换开销

我对选项 1 和 4 感到困惑。在虚拟机的情况下,上下文切换应该更快(我不知道为什么,这只是一种直觉)。对于选项 1,虚拟内存不实现地址转换,但由 MMU 执行此操作。 我错过了什么吗?那么正确答案应该是什么?

最佳答案

Virtual memory implements the translation of a program's address space into physical memory address space

这是逻辑内存翻译,而不是虚拟内存。这可能是错误的,除非你将“虚拟内存”和“逻辑内存”这两个术语混为一谈(正如许多人所做的那样)。可能是假的,也可能是真的。

Virtual memory allows each program to exceed the size of the primary memory

正确。

Virtual memory increases the degree of multiprogramming

说什么?这句话意味着什么?

Virtual memory reduces the context switching overhead

有可能。可能不会。不真不假。

关于operating-system - 使用虚拟内存进行上下文切换?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34459689/

相关文章:

linux - 在 Linux 中转储进程的页表条目

java - 像操作系统一样运行java应用程序

c - Linux 内核如何知道将输入事件写入哪个文件描述符?

operating-system - 等待和等待与循环等待有何不同?

linux - linux栈区为什么有可执行保护?

linux - arm linux中MMU页表中的缓存属性

c++ - Qt 生成 Key Press(keyboard) to the system(OF) 一种跨平台的方式

memory-management - 什么数据结构使用 1GB Linux 内核空间中的 128MB?

c - 链接器如何生成最终的虚拟内存地址?

Linux x86 : Where is the real mode address space mapped to in protected kernel mode?