X86 Protected Mode: Advantages, Process Protection & Memory Protection

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

Discussion Overview

The discussion centers around the concept of "Protected Mode" in x86 architecture, specifically focusing on its advantages, particularly memory and process protection. Participants explore the implications of these protections, how they are implemented, and the behavior of the processor in response to access violations.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant seeks clarification on the meaning of "Protected Mode" and lists various advantages, questioning the relevance of the term "protection" in the context of memory and process protection.
  • Another participant references external sources to provide context on protected mode and protection rings, indicating a desire to understand both vertical and horizontal protection mechanisms.
  • There is a discussion about whether the processor generates exceptions when a program attempts to access memory that is not allocated to it, with references to different modes of operation, including Virtual 8086 mode.
  • A later reply acknowledges finding information about general protection faults, suggesting that exceptions do occur under certain conditions, but does not clarify the specifics for protected mode.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the implementation of process and memory protection, and there is no consensus on the specifics of how the processor handles access violations in protected mode versus Virtual 8086 mode.

Contextual Notes

Limitations in understanding may stem from the complexity of the x86 architecture and the nuances of different operating modes, as well as the reliance on external sources for clarification.

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.
 

Similar threads

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