Notes three operating systems (virtual memory)

5-1 Virtual Memory: Causes
ideal memory is bigger, faster, cheaper non-volatile memory

System memory is not enough for measures to be taken:
1. Early manually override the need to save the instructions and data in memory
2. Program and more, technology exchange program program is temporarily unable to perform the large cost of external memory
3 with a smaller page size unit load larger limited program memory, virtual storage technology automatic

How to better use of memory 5-2: covering Technical
principle: according to their own logic program into several independent functional modules, the module can not be executed while a shared memory region, chronological run
Here Insert Picture Description
disadvantages: 1. Design overhead, dividing module cover, and determines the relationship
2. overlay module into memory from the external memory, it is actually a time for space

5-3 how to make better use of memory: switching technology
objectives: multi-channel program in memory, so that the running program or programs need to run more memory resources
method: You can not run the program temporarily to the external memory to get free memory space, the operating system in the memory management unit (MMU) to help save the contents of the entire address space of a process to external memory, and the external memory address space of a process is read into memory
Note: again swapped memory address is not necessarily in the original position
is a program in memory, leaving only the extreme case, the rest are in the exchange area

Coverage was between the module without calling a program within the internal relations, the exchange takes place between the OS and program memory, to the process as a unit of exchange

5-4 virtual memory technology
to implement virtual memory locality principle to take advantage of the program, which is a program during execution of the short period of time, the instruction address of the executed instructions are limited to a certain small time, small areas
that show only a small part of the program in memory, mostly on the hard disk, OS completed in MMU help
virtual memory technology basic features:
1. large user memory can be small disk space must be sufficient to provide the user's virtual physical memory space = + drive
2. part exchange: the virtual address space portion
3. discontinuous: the physical memory allocation is not continuous, discontinuous virtual space using

Page fault: Most virtual memory systems use paged virtual memory management technology that page management, based on increased demand paging and page replacement feature
basic ideas:
1. When a user program into memory to run not all the pages of the programs are loaded into memory, only part of the page is loaded, you can start running
2. during operation, if you want to access a program or data memory is not found, it sends a page fault to the system request, then the system will process the external memory when the appropriate page into memory, such that the program can continue to run

Virtual Memory Manager page: page table entry
resides bits: in the formula represents the page memory or an external memory in an external memory is 0 for the memory
protection bit: indicates the type which allows to make the page read-write access such as read only other
modified bit: indicates whether the page has been modified
access bit: whether accessed (including read and write)

Published 44 original articles · won praise 9 · views 3392

Guess you like

Origin blog.csdn.net/puying1/article/details/95517285