Paging

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
Dude86

Paging

Post by Dude86 »

Hi

  Does anyone knows some about paging?
Why is it better then segments or not?
Is there anyone who would help me implenting this in my OS?

Jelle Hak
Anton

RE:Paging

Post by Anton »

Most people at this forum know alot about pageing. It is better then segmentation, because for instance seg. works with larger pices of memory. Which means that you will be able to only swap out/in a hole segement(usualy >> 4k), Access privilages are for the hole segment. You should also note, that only Intel processors have segmentation.
Anton
carbonBased

RE:Paging

Post by carbonBased »

Without paging, you cannot swap in or out _anything_.  Paging (specifically the page fault exception handler) is what allows pages to be swapped in and our of memory.

Also, I don't believe the x86 architecture is the _only_ processor to support segmentation.  However, it is true that most support some form of paging, ergo paging is "more portable."

One of the things I want to note, is that paging and segmentation are not mutually exclusive.  You can use both at the same time, although it does get complicated quickly.

Paging is just generally a good idea because it allows you OS to support more memory than is installed on the hardware.  Also, on a multitasking system, it's inefficient to have all processes in memory at the same time.  There's no reason to have a task active in memory, for example, if it's only run once every other hour.  When it's not active, simply swap it to disk.

Cheers,
Jeff
Anton

RE:Paging

Post by Anton »

You don't need paging to swap in or swap out!!!!!! Read the Intel docs!!!!!
And about multitasking: With paging you swap out/in pages which are
not used, with segmentation you swap out the hole program(the one which runs ones per hour)
Anton
Post Reply