X86 Protected Mode: Advantages, Process Protection & Memory Protection

  • Thread starter Thread starter Stephanus
  • Start date Start date
  • Tags Tags
    Mode x86
AI Thread Summary
Protected mode in x86 architecture offers several advantages, primarily focusing on memory and process protection. It allows access to 4 gigabytes of memory, virtual memory, address translation, and improved multitasking capabilities. The key aspects of protection include preventing programs from accessing each other's data and limiting user programs' access to operating system data, implemented through the Memory Management Unit (MMU) using page protection mechanisms.When a program attempts to access memory outside its allocated range, the processor generates an exception, ensuring that unauthorized access is blocked. This behavior is consistent in both protected mode and virtual 8086 mode, where certain instructions or memory accesses that violate protection rules will trigger exceptions that the operating system must handle. Overall, protected mode enhances system stability and security by enforcing strict access controls on memory and processes.
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 came across a video regarding the use of AI/ML to work through complex datasets to determine complicated protein structures. It is a promising and beneficial use of AI/ML. AlphaFold - The Most Useful Thing AI Has Ever Done https://www.ebi.ac.uk/training/online/courses/alphafold/an-introductory-guide-to-its-strengths-and-limitations/what-is-alphafold/ https://en.wikipedia.org/wiki/AlphaFold https://deepmind.google/about/ Edit/update: The AlphaFold article in Nature John Jumper...
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
Back
Top