Windows
Paging request virtual memory System. Now let's analyze this system.
Virtual Address Space
The concept of virtual memory was proposed in the 1950s S. It was used to solve the problem of not loading the actual memory at a time.ProgramProposed a solution for this complex problem. In a virtual memory system, a program can access a larger address set that exceeds the available physical memory. The dedicated memory manager maps these logical addresses to the actual addresses, use the temporary storage on the disk to save the excess parts.
In the modern virtual memory implementation used by windows, virtual storage is organized into large and small units, calledPage. Each operating system process occupies its ownVirtual Address SpaceIs a set of virtual memory pages that can be read and written. Each page can be in three states:
- Free: No process has used this part of the address space. If you attempt to access this part of the space, read and write operations will invalidate some kind of runtime. This operation will pop up a Windows dialog box, prompting access conflict. (Java programs do not cause such errors. Only programs written in languages that support pointers can cause such errors .)
- Retained: This part of the address space is reserved for future use by the process, but cannot be accessed before delivery. Many Java stacks are retained at the beginning.
- Submit: The memory that the program can access is completelySupportedThat is, the page frame has been allocated to the paging file. The submitted page is loaded into the primary storage only when it is referenced for the first time.Request Paging.
Figure 1 illustrates how a virtual page in the process address space maps to a physical page frame in the memory.
Figure 1. ing between virtual pages and physical page frames in the process address space
If you are running a 32-bit machine (such as an Intel processor), the entire virtual address space of the process is 4 GB, because this is the maximum address space that can be addressed with 32 bits. Windows usually does not allow you to access all the memory in the address space. The process uses less than half of the memory, and the others are used by windows.