which one is more efficient/faster/better???
theyre both supported by the mardware(intel) only that GDT is not available on other systems like ones based on motorola processors
but which one works better??? I might just use paging to make it more portable and for the fact that MMURTL(Im basing it on mm) already has the paging implemented
Paging vs GDT
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Paging vs GDT
both of them are pretty fast if they're properly used. Segmentation by itself has no additionnal cycles (remember you *need* a GDT to work in pmode) from the CPU, unless you change your selectors frequently ...
Paging may lead to degradation of performances if the processor has to lookup too often in the main memory for page table entries (this is, when you invalidate them or if your code has bad locallity).
This is usually more tricky to control than the segmentation overhead.
by the by, what is that MMUTRL stuff you're talking about in your 5 last posts ?
Paging may lead to degradation of performances if the processor has to lookup too often in the main memory for page table entries (this is, when you invalidate them or if your code has bad locallity).
This is usually more tricky to control than the segmentation overhead.
by the by, what is that MMUTRL stuff you're talking about in your 5 last posts ?
Re:Paging vs GDT
MMURTL is a sample OS 32 bit multitasking messaging with paged memory that comes with the book mmurtl
it comes with tools and is written in C and ASM boh included..
www.sensorypublishing.com
it comes with tools and is written in C and ASM boh included..
www.sensorypublishing.com
Re:Paging vs GDT
Although segmentation cannot be disabled, using several segments can be slower than using paging together with a flat memory model. Every time you switch segments the CPU needs to reload a descriptor, which isn't necessary if you use only paging.