Segmentation in Linux : Segmentation & Paging are redundant?

Posted by claws on Stack Overflow See other posts from Stack Overflow or by claws
Published on 2010-06-12T14:58:39Z Indexed on 2010/06/12 15:02 UTC
Read the original article Hit count: 301

Hello,

I'm reading "Understanding Linux Kernel". This is the snippet that explains how Linux uses Segmentation which I didn't understand.

Segmentation has been included in 80 x 86 microprocessors to encourage programmers to split their applications into logically related entities, such as subroutines or global and local data areas. However, Linux uses segmentation in a very limited way. In fact, segmentation and paging are somewhat redundant, because both can be used to separate the physical address spaces of processes: segmentation can assign a different linear address space to each process, while paging can map the same linear address space into different physical address spaces. Linux prefers paging to segmentation for the following reasons:

Memory management is simpler when all processes use the same segment register values that is, when they share the same set of linear addresses.

One of the design objectives of Linux is portability to a wide range of architectures; RISC architectures in particular have limited support for segmentation.

All Linux processes running in User Mode use the same pair of segments to address instructions and data. These segments are called user code segment and user data segment , respectively. Similarly, all Linux processes running in Kernel Mode use the same pair of segments to address instructions and data: they are called kernel code segment and kernel data segment , respectively. Table 2-3 shows the values of the Segment Descriptor fields for these four crucial segments.

I'm unable to understand 1st and last paragraph.

© Stack Overflow or respective owner

Related posts about operating-system

Related posts about linux-kernel