virtual memory 到底存在哪里?
https://searchstorage.techtarget.com/definition/virtual-memory
这篇文章挺有用的,virtual memory uses both hardware and software to enable a computer to compensate for physical memory shortages, temporarily transferring data from random access memory to disk storage. temporarily tranferring data from random access memory to disk storage. Mapping chunks of memory to disk files enables a computer to treat secondary memory as though it were main memory.
所以VM是把一部分main memory放到硬盘上了,然后有了main memory更大的“假象”
Virtual memory was developed at a time when physical memory -- also referenced as RAM -- was expensive. Computers have a finite amount of RAM, so memory will eventually run out when multiple programs run at the same time. A system using virtual memory uses a section of the hard drive to emulate RAM. With virtual memory, a system can load larger or multiple programs running at the same time, enabling each one to operate as if it has more space, without having to purchase more RAM.
page fault 是否是MMU内部实现?
Virtual memory uses both hardware and software to operate. When an application is in use, data from that program is stored in a physical address using RAM. A memory management unit (MMU) maps the address to RAM and automatically translates addresses. The MMU can, for example, map a logical address space to a corresponding physical address.
网友评论