X86 Protected Mode: Advantages, Process Protection & Memory Protection

  • Thread starter Thread starter Stephanus
  • Start date Start date
  • Tags Tags
    Mode x86
Click For Summary
SUMMARY

The discussion centers on the "Protected Mode" in x86 architecture, highlighting its advantages such as access to 4 gigabytes of memory, virtual memory, and improved process and memory protection. Key points include that process protection prevents programs from accessing each other's data, implemented via the page protection mechanism of the Memory Management Unit (MMU). The conversation also addresses how the processor handles unauthorized memory access, confirming that it generates exceptions, particularly in Virtual 8086 mode and protected mode.

PREREQUISITES
  • Understanding of x86 architecture and its modes
  • Familiarity with Memory Management Units (MMUs)
  • Knowledge of process and memory protection mechanisms
  • Basic concepts of virtual memory and addressing modes
NEXT STEPS
  • Research "x86 Protected Mode" in Intel architecture manuals
  • Explore "General Protection Fault" in x86 systems
  • Learn about "Virtual 8086 mode" and its limitations
  • Investigate the role of "Memory Management Units" in process isolation
USEFUL FOR

Computer architects, operating system developers, and anyone interested in low-level programming and memory management in x86 systems will benefit from this discussion.

Stephanus
Messages
1,316
Reaction score
104
Dear PF Forum,
What does "Protected mode" means in x86 architecture?
I try to understand this, but failed.
This is the "Protected Mode" advantages from http://prodebug.sourceforge.net/pmtut.html#Advantages that I read:
- Access to 4 gigabytes of memory
- Virtual memory
- Address translation
- Programs work with logical addresses.
- Improved segmentation
- Memory protection <-
- Process protection <-
- 32-bit registers
- Improved addressing modes
- Multitasking support
- Hardware debugging
All these have nothing to do with the word "Protection" only in this two section:
- Memory protection <-
- Process protection <-

So what I really want to know is this:
- Process protection
In a similar fashion to memory protection, different programs (or parts of a program) can be protected from each other. One program might not have access to another program's data, while the operating system might have access to everyone's data. Conversely, user programs may have only limited access to the operating system's data. This is actually implemented using the page protection mechanism provided by the MMU.
Supposed my program is allocated at 10000h to 20000h
so when I try to
mov AX,[20001h]
1. does the processor really send something? Perhaps interrupt?
2. Is there really one or two instructions before the OS JMP to my program, that the next instruction will be limited to access 10000h to 20000h?
Thank you very much

 
Computer science news on Phys.org
Mark44 said:
Thanks @Mark44 for your answer.
While https://en.wikipedia.org/wiki/Protection_ring only address "vertical" protection, I mean. a program with lower privileged level/high privilege number can only access instruction in a predefined manner, I want to know what about the "horizontal" protection (but I learn something new, too. Protection Ring). Can a program access memory that's not allocated to it? The answer is no. But how the processor handle this? Does the processor really thrrows an exception?
https://en.wikipedia.org/wiki/Protected_mode#The_286 addresses similar issue.
Virtual 8086 mode
With the release of the 386, protected mode offers what the Intel manuals call virtual 8086 mode...

Virtual 8086 mode, however, is not completely backwards compatible with all programs. Programs that require segment manipulation, privileged instructions, direct hardware access, or use self-modifying code will generate an exception that must be served by the operating system...
So, the processor does throw exception. But it's in Virtual 8086 mode. What about in protected mode? Will the processor generate an exeption if a program is trying to access memory parts that's not allocated to it?
Thank you very much.
 
I am having a hell of a time finding a good all-in-one inkjet printer. I must have gone through 5 Canon, 2 HP, one Brother, one Epson and two 4 X 6 photo printers in the last 7 yrs. all have all sort of problems. I don't even know where to start anymore. my price range is $180-$400, not exactly the cheapest ones. Mainly it's for my wife which is not exactly good in tech. most of the problem is the printers kept changing the way it operate. Must be from auto update. I cannot turn off the...

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 23 ·
Replies
23
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
10
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
22
Views
5K
Replies
29
Views
5K
  • · Replies 13 ·
Replies
13
Views
4K