Paging problems..

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
Crg^

Paging problems..

Post by Crg^ »

Hey, I dont know about the paging mechanism.. First of all
to create a basic page table I need a lot of ram- 1Mb. Then
if I want for other appz. other memory mappings then I'll
need some memory too, anyone can give me an algoritm?
Guest

RE:Paging problems..

Post by Guest »

>On 2001-02-24 10:43:07, Crg^ wrote:
>Hey, I dont know about the paging mechanism.. First of
all
>to create a basic page table I need a lot of ram- 1Mb.
Then
>if I want for other appz. other memory mappings then
I'll
>need some memory too, anyone can give me an algoritm?

You only need 8k for a _basic_ page table + directory.
4k for each. That's all you need.

As for how to do it... I'm in the process of implementing
it in my OS.

in my memory.Allocate() I allocate a chunk of 4k blocks.
If I don't have enough 4k blocks to make the allocation,
I page a few blocks to disk (the least used ones) and
then allocate and map those blocks to the program
wishing the memory.
Alexei Frounze

RE:Paging problems..

Post by Alexei Frounze »

>On 2001-02-24 10:43:07, Crg^ wrote:
>Hey, I dont know about the paging mechanism.. First of
all
>to create a basic page table I need a lot of ram- 1Mb.
Then
>if I want for other appz. other memory mappings then
I'll
>need some memory too, anyone can give me an algoritm?

That's simple enough.
See either 386 manual or IA software developer's
manual (vol 3:system programming).
Examples are available at http://welcome.to/pmode/

Good Luck
Post Reply