Is page table and GDT the same thing?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
xunilams
Posts: 6
Joined: Wed Dec 20, 2017 12:08 pm
Freenode IRC: smalinux

Is page table and GDT the same thing?

Post by xunilams »

I am confused, What're the differences between the "Page Table" concept and GDT?
Are the two the same? Alternatives? (if yes, they are alternatives so I could omit GDT forever and use Page Table only)?
Or GDT is just the implementation of the Page Table concept?
Not all who wander are lost.
nullplan
Member
Member
Posts: 1644
Joined: Wed Aug 30, 2017 8:24 am

Re: Is page table and GDT the same thing?

Post by nullplan »

The two are completely and entirely unrelated. The GDT defines the segments in the system. Most OSes just make all the segments span the entire address space, but there are exceptions to this. Like the TSS, which actually needs a nonzero base and limit. Anyway, you usually need the segments to set up other attributes, like the CPL or the default instruction size.

The page tables on the other hand define the pages, that is, the mapping from virtual to physical addresses. Altogether different concept.
Carpe diem!
xunilams
Posts: 6
Joined: Wed Dec 20, 2017 12:08 pm
Freenode IRC: smalinux

Re: Is page table and GDT the same thing?

Post by xunilams »

kzinti wrote:Is using a search engine so hard?
Thank you.
I just wanted to understand relationship between, but I found this.
Image
thanks again.
Not all who wander are lost.
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: Is page table and GDT the same thing?

Post by kzinti »

That's a pretty good overall view of the memory system.
xunilams
Posts: 6
Joined: Wed Dec 20, 2017 12:08 pm
Freenode IRC: smalinux

Re: Is page table and GDT the same thing?

Post by xunilams »

nullplan wrote:The two are completely and entirely unrelated. The GDT defines the segments in the system. Most OSes just make all the segments span the entire address space, but there are exceptions to this. Like the TSS, which actually needs a nonzero base and limit. Anyway, you usually need the segments to set up other attributes, like the CPL or the default instruction size.

The page tables on the other hand define the pages, that is, the mapping from virtual to physical addresses. Altogether different concept.
Thank you so much.
Not all who wander are lost.
Post Reply