I am a newbie. I am reading Understanding Linux Kernel. There, I am trying to understand how logical address got translated to physical address. To my understanding, I believe logical address got translated to linear address(with the help of Segmentation Unit) and then linear got translated to physical address(with the help of paging unit). Digging a step deeper, I found set of segmentation register changes only if we are switching from user to kernel mode, else it remain constant. i.e. for the various process executing in user mode, the set of segmentation register which is cs, ds, ss etc. are same. And also in the segment descriptor table base and limit fields of various process executing is also the same.Under such situation, I am not able to understand how logical address of one process differs from the logical address of another?
How logical address of one process differs from the logical address of another?
process;linux kernel;virtual memory
The different mappings (per-process) of the same set of logical addresses to different physical on x86 Linux is ONLY through paging. I.e. Basically the different CR3 register value which points to a different PGD for each process. With the same CS, DS values throughout (meaning, nothing unique about these per-process, and same thing goes for the segment descriptors as well, only the permissions differ between user-mode and kernel-mode), you have the same set of linear addresses for all processes, and hence the only difference that can be had is via paging.Thank You Krishna Kumar Sir for your answer.