Page 1 of 1

Paging

Posted: Mon Dec 23, 2002 12:00 am
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

RE:Paging

Posted: Thu Dec 26, 2002 12:00 am
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

RE:Paging

Posted: Thu Dec 26, 2002 12:00 am
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

RE:Paging

Posted: Fri Dec 27, 2002 12:00 am
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