MindMap Gallery 5.Virtual memory
408 Postgraduate Entrance Examination Collection (Operating System 5) refers to a memory system with request transfer function and replacement function, which can logically expand the memory capacity.
Edited at 2024-03-07 14:44:22This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
Chapter 5: Virtual Memory
Characteristics of conventional storage management methods
Disposable
Residency
locality principle
When the program is executed, it will show local characteristics, that is, within a short period of time, the execution of the program is only limited to a certain part, and accordingly, the storage space it accesses is also limited to a certain area.
time constraints
If an instruction in the program is once executed, the instruction may be executed again soon; if a certain data has been accessed, the data may be accessed again soon. Typical reasons for time constraints are due to the presence of a large number of loop operations in the program.
space limitations
Once a program accesses a certain storage unit, its nearby storage units will also be accessed soon. That is, the addresses accessed by the program within a period of time may be concentrated within a certain range. A typical situation is the program's Executed sequentially.
definition
Refers to a memory system that has a request function and a replacement function, and can logically expand the memory capacity.
advantage
Large program: Larger user programs can be executed in smaller available memory;
Large user space: The virtual memory space available to users is usually larger than physical memory (real memory)
Concurrency: More programs can be accommodated in memory for concurrent execution;
Easy to develop: no need to affect the program structure during programming
Exchanging CPU time and external memory space for expensive memory space is a resource conversion technology in the operating system.
feature
discreteness
Refers to the discrete allocation method used in memory allocation, which is the basis for the implementation of virtual memory
multiple times
It means that a job is divided into multiple times and loaded into the memory for running. That is, it is not necessary to load all the jobs when they are running. It is only necessary to load the part of the program and data currently to be run into the memory. Multiplicity is the most important feature of virtual memory
interchangeability
Refers to allowing swapping in and out between the swap area of memory and external storage during the running of the job.
virtuality
It refers to the ability to logically expand the memory capacity so that the memory capacity seen by the user is much larger than the actual memory capacity.
How virtual memory is implemented
Request paging storage management method
hardware
Request page table mechanism
Format: Page number, physical block number, status bit P, access field A, modification bit M, external memory address
page fault interrupt mechanism
Address conversion mechanism (process diagram is critical)
Request memory allocation in paging
Minimum number of physical blocks
That is, the minimum number of physical blocks required to ensure the normal operation of the process
Memory allocation strategy
Fixed allocation local permutation (King's eldest son)
Variable allocation global permutation (the king's second son)
Variable allocation local permutation (The King's Youngest Son)
Physical block allocation algorithm
even distribution algorithm
proportional allocation algorithm
Priority-based allocation algorithm
page loading strategy
When should the system load the required page?
Pre-paging strategy (cannot be implemented)
Request paging strategy (given only if needed)
Where should the system load these pages?
swap area
file area
Page loading process
Page missing rate (calculation questions)
request staging system
hardware
Segment table organization requesting segmentation
missing segment interrupt mechanism
Address Translation Authority
Page replacement algorithm
The concept of jitter
That is, the page that has just been swapped out will be accessed again soon, and it needs to be loaded back in. At this time, it is necessary to select another page to load out.
Optimal replacement algorithm (needs to predict the subsequent process, so it cannot be implemented)
First-in-first-out page replacement algorithm (FIFO)
Select the page that has been in memory the longest and eliminate it
Most recently unused replacement algorithm (LRU) Recently
Register support
Special stack structure
Least Used Replacement Algorithm (LFU) Frequently
Clock replacement algorithm (judgment of access bit A)
Improved type - increase the thinking judgment of the modified position M
Page buffering algorithm (PBA, page buffering algorithm)
free page linked list
Modify page list