Paging vs GDT

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
soilwork

Paging vs GDT

Post by soilwork »

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
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Paging vs GDT

Post by Pype.Clicker »

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 ?
soilwork

Re:Paging vs GDT

Post by soilwork »

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
Tim

Re:Paging vs GDT

Post by Tim »

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.
Post Reply