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
System123
Member
Member
Posts: 196
Joined: Mon Jul 07, 2008 1:25 am

Paging.

Post by System123 »

I made alot of progress on my kernel this weekend. I am busy implementing my paging now. I wanted to find out are how many page tables i should have? In the tutorials i have read they all say 2. Table 1 at 0x0 and table 768 at 0x100000. Is this correct? The other thing i wanted to find out is how to dynamically free and allocate memory?
Gizmic OS
Currently - Busy with FAT12 driver and VFS
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Paging.

Post by Combuster »

I suggest you start reading up on the basics before asking such questions. http://www.jamesmolloy.co.uk/tutorial_html/index.html

Short answers:
Q1) I can't tell.
Q2) At least one guide I know uses no page tables
Q3) Your math's off.
Q4) See above link.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: Paging.

Post by cr2 »

The number of page tables that you should have depends on how big you want your address space to be(the maximum is 1024, or 4G of memory)(each page table gives you access to 4M of memory).

For dynamic memory allocation, http://wiki.osdev.org/Memory_Allocation might also help.
OS-LUX V0.0
Working on...
Memory management: the Pool
System123
Member
Member
Posts: 196
Joined: Mon Jul 07, 2008 1:25 am

Re: Paging.

Post by System123 »

Thanks thats all i wanted to know
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Post Reply