X86 Protected Mode: Advantages, Process Protection & Memory Protection

  • Thread starter Stephanus
  • Start date
  • Tags
    Mode x86
In summary, protected mode provides 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, and hardware debugging.
  • #1
Stephanus
1,316
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
  • #3
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.
 

1. What is X86 protected mode and what are its advantages?

X86 protected mode is a processor mode used in x86 microprocessors that allows for virtual memory addressing and multitasking. Its main advantage is that it allows for multiple programs to run simultaneously, increasing the efficiency and performance of the system.

2. How does process protection work in X86 protected mode?

Process protection in X86 protected mode involves the use of privilege levels to restrict access to certain areas of memory. Each process is assigned a privilege level, and only processes with a higher privilege level can access the memory of processes with lower privilege levels. This helps to prevent unauthorized access and protect the system from malicious software.

3. What is memory protection in X86 protected mode and why is it important?

Memory protection in X86 protected mode involves the use of memory segmentation and paging to isolate and protect different areas of memory. This is important because it allows for the efficient use of memory by different processes, as well as preventing one process from accessing or modifying the memory of another process.

4. How does X86 protected mode differ from real mode?

X86 protected mode differs from real mode in several ways. In real mode, the processor can only access 1 MB of memory and can only run one program at a time. In protected mode, the processor can access up to 4 GB of memory and can run multiple programs simultaneously. Additionally, protected mode provides virtual memory addressing and memory protection, which are not available in real mode.

5. Can X86 protected mode be disabled or bypassed?

Yes, X86 protected mode can be disabled or bypassed by using a software interrupt or by changing the contents of the control register. However, this should only be done by experienced programmers for specific purposes, as it can cause system instability or security vulnerabilities.

Similar threads

  • Computing and Technology
Replies
11
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
23
Views
5K
  • STEM Academic Advising
Replies
1
Views
2K
Replies
10
Views
2K
  • Programming and Computer Science
Replies
29
Views
3K
  • STEM Academic Advising
Replies
5
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
  • STEM Academic Advising
Replies
13
Views
2K
  • STEM Academic Advising
Replies
13
Views
3K
Back
Top