Context: I'm reading "Understanding the Linux kernel, 3d ed", which uses the 2.6.11 kernel.
Question: As I understand, the physical address is obtained by translating the linear address, which is obtained by translating the logical address. The logical address consists of a segment selector, which identifies a segment in a Description Table
The Linux Global Description Table includes, amongst other segments, a user code and data segment. But the base address of both segments is
0x0, and their size is also the same. So they completely overlap. So as I understand, the logical address
cs + offset is identical to the logical address
ds + offset, where
ds are the CPU registers that hold respectively the code segment selector and data segment selector. I think this is the case because both segments have the same base address, which is incremented with the offset to get the linear address.
If this is the case, and they both map to the same linear address, don't they also map to the same physical address? If so, what is the use of having separate