Page 1 of 1

Paging

Posted: Wed Jan 08, 2003 1:49 am
by Perica
..

Re:Paging

Posted: Wed Jan 08, 2003 2:02 am
by rdragon
well.... the website you referenced actually has a few articles describing what paging is, what it does, how to implement it, etc... have you taken a look at them? maybe you could be more specific as to just what you dont understand?

Re:Paging

Posted: Wed Jan 08, 2003 2:29 am
by Perica
..

Re:Paging

Posted: Wed Jan 08, 2003 2:32 am
by rdragon
"Pagetables":
http://osdev.neopages.net/tutorials/pagetables.php

"Implementing basic Paging" :
http://osdev.neopages.net/tutorials/paging.php

There is a subsection "Memory Management" on that page... take a read through those, it should explain it fairly well.

Re:Paging

Posted: Wed Jan 08, 2003 2:43 am
by whyme_t
Perica Senjak wrote: Could you please tell me the Name of the tutorials that Explain what Paging is and what it does?
This kind of question is going to rub people up the wrong way. You've seen the site, each subject is in a separate categories, how hard would it be to spend a while looking through the tutorials. You might ask because you don't want to waste precious time looking when you could just ask, but it makes you appear lazy, and no one wants to help a lazy person.

With that said, read through the memory management docs on the above mentioned site. It shouldn't take you long to see implementing basic paging, memory management 1 & 2, and page tables, to name a few.

Re:Paging

Posted: Wed Jan 08, 2003 3:21 am
by DarylD
Yes, read through the tutorials there, they are very good and fairly easy to read, remember if you don't understand something read it again, then use google and come on here as a last result.

This forum is more for design decisions and for questions when people are stuck assuming they have already done their best to figure out the answer.

And Perica, I know you don't listen but paging/segmentation etc is explained thoroughly in books, it may only be at a theoretical level but it maps almost exactly to actual processors. I didn't fully understand it until I read about it (and I re-read the chapter about 10 times!). You really can't do without, they are not *that* expensive and believe me by the end you will feel much more confident of what you are doing.

Re:Paging

Posted: Wed Jan 08, 2003 3:52 am
by Perica
..

Re:Paging

Posted: Wed Jan 08, 2003 4:05 am
by whyme_t
Perica Senjak wrote: i have already looked and i don't see a tutorial that explains what it is or what it does - I only see tutorials on how to implement it.
Both of Tim's memory management docs explain paging (and other important topics), what it is, but not how to implement it (at a low level). But you do have to take a long time to read and digest it!

Re:Paging

Posted: Wed Jan 08, 2003 4:09 am
by DarylD
I personally prefer the Silbershatz book but that and the tanenbaum one are very similar in what they describe.

Both explain paging and segmentation including virtual memory.

Re:Paging

Posted: Wed Jan 08, 2003 6:15 am
by Pype.Clicker
Perica Senjak wrote: Could you please tell me the Name of the tutorials that Explain what Paging is and what it does?

Well, i don't understand what Paging Does? What Effect does it make on an OS? How is it used?
The main goal of paging is to allow virtual memory management. Each process can get a 4GB address space and the OS will decide what is physically available and what is on disk. It also gives you the ability to share memory between several process etc.

Imagine that you give several person a empty note pad and provide sheet of paper on demand and you get an idea of what paging is. When you have no more sheet, you (the OS) can decide to get back some sheet you gave, commit their content in your Big Book (the HDD), wipe the sheet and give it back to someone else which needs a fresh, new sheet to continue writing ...

You (the OS) know which sheet is allocated to which "virtual page" of each notepad : this mapping is the PAGE TABLE.

Hope this will help you .

Re:Paging

Posted: Tue Jan 14, 2003 6:50 am
by Perica
..

Re:Paging

Posted: Tue Jan 14, 2003 9:16 am
by DarylD
To use the pages of memory normally it would make calls to a memory manager using malloc/free and the like. The memory manager will keep tracks of which pages are where. Some pages will be used for application code for examples, others may be used for caching.

Its actually quite conceptually simple once you get your head around it.

Just remember, every byte of memory will need to be speficically allocated before it can be used. I.e. you need to fill page tables and the page directory accordingly.