Real-time mode: The addressing adopts the same 16-bit segment and offset as 8086. The maximum addressing space is 1 MB and the maximum segment is 64 KB. You can use 32-bit commands. 32-bit x86 CPU is used for high-speed 8086.
Protection Mode: 32-bit segments and offsets are used for addressing. The maximum addressing space is 4 GB and the maximum segment is 4 GB (Pentium pre and 64 GB later ). In the protected mode, the CPU can enter the virtual 8086 mode, which is the real mode in the protected mode.ProgramRunning environment.
The fundamental difference between the protection mode and the actual mode is whether the process memory is protected or not. The difference between addressable spaces is only the result of this reason. The real mode regards the entire physical memory as a segmented area, and the programCodeAs data is located in different regions, system programs and user programs are not treated differently, and every Pointer Points to a "real" physical address. In this way, if a pointer of a user program points to the system program area or other user program areas and changes the value, then for the modified system program or user program, the consequences may be disastrous. To overcome this poor memory management approach, processor vendors have developed a protection mode. In this case, the physical memory address cannot be directly accessed by the program. The internal address (virtual address) of the program must be converted from the operating system to the physical address for access. The program knows nothing about this.
At this point, the process (now we can call the program a process) has a strict boundary, and no other process can access its own physical memory area, it is not accessible even within the scope of its own virtual address, because some virtual zone domains have been put into some public system runtime libraries. You cannot modify these regions as needed. If you modify these regions, there will be: SIGSEGV (Linux segment error); illegal memory access dialog box (Windows dialog box ).
The CPU startup environment is in 16-bit real-time mode, and then you can switch to the protection mode. However, you cannot switch back from the protection mode to the actual mode.