- Mastering Assembly Programming
- Alexey Lyashko
- 235字
- 2021-08-20 10:23:27
Protected mode - segmentation
While it was all fine and simple in real mode, things become a bit more complicated when it comes to protected mode. Unfortunately, memory segmentation is still intact, but the segment register no longer contain addresses. Instead, they are loaded with the so-called selectors, which are, in turn, the indices into the descriptor table multiplied by 8 (shifted 3 bits to the left). The two least significant bits designate the requested privilege level (0 for kernel space to 3 for user land). The third bit (at index 2) is the TI bit (table indicator), which indicates whether the descriptor being referred is in a global descriptor table (0) or in a local descriptor table (1). The memory descriptor is a tiny 8-byte structure, which describes the range of physical memory, its access rights, and some additional attributes:

Descriptors are stored in at least two tables:
- GDT: Global descriptor table (used by the operating system)
- LDT: Local descriptor table (per task descriptor table)
As we may conclude, the organization of memory in protected mode is not that different from that in real mode after all.
There are other types of descriptors--interrupt descriptors (stored in the interrupt description table (IDT)) and system descriptors; however, since these are in use in kernel space only, we will not discuss them, as that falls out of the scope of this book.
- C++程序設計(第3版)
- OpenCV for Secret Agents
- Flask Web開發入門、進階與實戰
- 數據庫系統原理及MySQL應用教程
- Unity Game Development Scripting
- Node.js:來一打 C++ 擴展
- Creating Stunning Dashboards with QlikView
- OpenGL Data Visualization Cookbook
- Couchbase Essentials
- Java Web從入門到精通(第3版)
- Flink技術內幕:架構設計與實現原理
- Mastering Concurrency in Python
- HTML5 Game Development by Example:Beginner's Guide(Second Edition)
- Elasticsearch實戰(第2版)
- 三步學Python