Virtual address
Moderator:Moderators
Which virtual addresses uses an OS when called by a task ? How can the OS reach the GDT in different virtual addresses space ? What happe to the contents of the segment registers when in a GDT or LDT a descriptor i cancelled changing the the selector index ?
Re: Virtual address
Not so simple. The kernel has its own Virtual Address Space. Typically this is an identity map memory which means that Virtual Address is the same value as Physical Address, allowing the kernel to write to anything, even "in" other VASsWhich virtual addresses uses an OS when called by a task ?
There is only 1 GDT. That is why its name is the Global Descriptor Table. Typically it is kept in the kernels Virtual Address Space. However, as the GDTR register uses the physical memory address, the concept of the GDT being in a VAS is somewhat pointless.How can the OS reach the GDT in different virtual addresses space ?
The contents of the registers stay the same when you fiddle with the GDT or LDT - the segment caches are only updated when you write a value to a segment register. If however you try to use a segment register where the entry in the GDT/LDT has been fiddled with, you get Exception 11, Segment Not Present, or a GPF if it contains valid, wrong informationWhat happe to the contents of the segment registers when in a GDT or LDT a descriptor i cancelled changing the the selector index ?
~Andrew
