Re: Why need the Global Descriptor Table in the kernel?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Xiangfei Jia wrote:

>On 8086 microprocessors, there are three types of addresses: Logical
address, Linear address (or Virtual address),  and Physical address.

>Logical addresse contains of a segment (segment identifier) and a offset.
Each segment is represented by a segment descriptor. All these descriptors
are stored either in GDT or LDT.
> The Linux kernel only has limited support of semgnets. I also looked at
the GDT inside. It seems that all the segments in the table has the access
of the full range of the memory.
> BUT, the segments are only useful to allow different section of memory in
a single process.

>My question is (1) does the kernel still use logical address and has to
convert from logcial to linear addresses? (2) why the kernel still use the
GDT, which is not very useful in the kernel?


As u said correctly that linux uses segmentation in a very limited way and
it prefers paging to segmentation as memory management is simpler when they
share the same set of linear addreses.

>(1) does the kernel still use logical address and has to convert from
logcial to linear addresses?
kernel still uses logical address and need to convert it to linear address.
to speed up the translation the 80x86 architechture provides some non
programmable registers for each of the six programmable segmentation
registers.Each non-programmable register contains the segemnt descriptor
specified by segment selector contained in the corresponding sementation
register.so when the segment selector is loaded ina segmentation register
its segemnt descriptor gets loaded from memory into a non-programmable
register.From here we can perform the translation without using GDT or LDT ,
processor can directly refer to the CPU register containing the descriptor.

>(2) why the kernel still use the GDT, which is not very useful in the
kernel?

Access to the GDT or LDT are necessary only when the contents of the
segmentation register change.



Thanks & Regards
lk
----- Original Message -----
Sent: Wednesday, June 08, 2005 8:48 AM
Subject: Why need the Global Descriptor Table in the kernel?

On 8086 microprocessors, there are three types of addresses: Logical address, Linear address (or Virtual address),  and Physical address.

Logical addresse contains of a segment (segment identifier) and a offset. Each segment is represented by a segment descriptor. All these descriptors are stored either in GDT or LDT. The Linux kernel only has limited support of semgnets. I also looked at the GDT inside. It seems that all the segments in the table has the access of the full range of the memory. BUT, the segments are only useful to allow different section of memory in a single process.

My question is (1) does the kernel still use logical address and has to convert from logcial to linear addresses? (2) why the kernel still use the GDT, which is not very useful in the kernel?

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux