OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Nov 23, 2020 7:04 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Is page table and GDT the same thing?
PostPosted: Mon Feb 10, 2020 12:26 pm 
Offline

Joined: Wed Dec 20, 2017 12:08 pm
Posts: 6
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.


Top
 Profile  
 
 Post subject: Re: Is page table and GDT the same thing?
PostPosted: Mon Feb 10, 2020 1:48 pm 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 425
Is using a search engine so hard?

GDT:
https://en.wikipedia.org/wiki/Global_Descriptor_Table

Page Table:
https://en.wikipedia.org/wiki/Page_table

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
 Post subject: Re: Is page table and GDT the same thing?
PostPosted: Mon Feb 10, 2020 1:52 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 706
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.

_________________
Thou hast outraged, not insulted me, sir; but for that I ask thee not to beware of Starbuck; thou wouldst but laugh; but let Ahab beware of Ahab; beware of thyself, old man.


Top
 Profile  
 
 Post subject: Re: Is page table and GDT the same thing?
PostPosted: Mon Feb 10, 2020 2:10 pm 
Offline

Joined: Wed Dec 20, 2017 12:08 pm
Posts: 6
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.


Top
 Profile  
 
 Post subject: Re: Is page table and GDT the same thing?
PostPosted: Mon Feb 10, 2020 3:31 pm 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 425
That's a pretty good overall view of the memory system.

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
 Post subject: Re: Is page table and GDT the same thing?
PostPosted: Mon Feb 10, 2020 3:39 pm 
Offline

Joined: Wed Dec 20, 2017 12:08 pm
Posts: 6
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group