📄 s06_05.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>80386 Programmer's Reference Manual -- Section 6.5</TITLE></HEAD><BODY><B>up:</B> <A HREF="c06.htm">Chapter 6 -- Protection</A><BR><B>prev:</B> <A HREF="s06_04.htm">6.4 Page-Level Protection</A><BR><B>next:</B> <A HREF="c07.htm">Chapter 7 -- Multitasking</A><P><HR><P><H1>6.5 Combining Page and Segment Protection</H1>When paging is enabled, the 80386 first evaluates segment protection, thenevaluates page protection. If the processor detects a protection violationat either the segment or the page level, the requested operation cannotproceed; a protection exception occurs instead.<P>For example, it is possible to define a large data segment which has somesubunits that are read-only and other subunits that are read-write. In thiscase, the page directory (or page table) entries for the read-only subunitswould have the U/S and R/W bits set to x0, indicating no write rights forall the pages described by that directory entry (or for individual pages).This technique might be used, for example, in a UNIX-like system to definea large data segment, part of which is read only (for shared data or ROMmedconstants). This enables UNIX-like systems to define a "flat" data space asone large segment, use "flat" pointers to address within this "flat" space,yet be able to protect shared data, shared files mapped into the virtualspace, and supervisor areas.<PRE>Table 6-5. Combining Directory and Page ProtectionPage Directory Entry Page Table Entry Combined ProtectionU/S R/W U/S R/W U/S R/WS-0 R-0 S-0 R-0 S xS-0 R-0 S-0 W-1 S xS-0 R-0 U-1 R-0 S xS-0 R-0 U-1 W-1 S xS-0 W-1 S-0 R-0 S xS-0 W-1 S-0 W-1 S xS-0 W-1 U-1 R-0 S xS-0 W-1 U-1 W-1 S xU-1 R-0 S-0 R-0 S xU-1 R-0 S-0 W-1 S xU-1 R-0 U-1 R-0 U RU-1 R-0 U-1 W-1 U RU-1 W-1 S-0 R-0 S xU-1 W-1 S-0 W-1 S xU-1 W-1 U-1 R-0 U RU-1 W-1 U-1 W-1 U W</PRE><P><HR><P><EM><H3>Note</H3><PRE>S -- SupervisorR -- Read onlyU -- UserW -- Read and Writex indicates that when the combined U/S attribute is S, the R/W attributeis not checked.</PRE></EM><P><HR><P><HR><B>up:</B> <A HREF="c06.htm">Chapter 6 -- Protection</A><BR><B>prev:</B> <A HREF="s06_04.htm">6.4 Page-Level Protection</A><BR><B>next:</B> <A HREF="c07.htm">Chapter 7 -- Multitasking</A></BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -