OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 6:07 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Paging problems..
PostPosted: Sat Feb 24, 2001 12:00 am 
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?


Top
  
 
 Post subject: RE:Paging problems..
PostPosted: Sat Feb 24, 2001 12:00 am 
>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.


Top
  
 
 Post subject: RE:Paging problems..
PostPosted: Mon Feb 26, 2001 12:00 am 
>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


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: cloudapio, ErenJaeger, Majestic-12 [Bot] and 158 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group