[Solved] Questions:Paging

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

[Solved] Questions:Paging

Post by LegendDairy »

Hi,

I was reading about paging (the tutorial) but now I still have some questions.

When they explained attributes: present, dirty, R/W... They didn't very well explained every attribute.

-Now I was wondering what's the difference between available and present? Does present mean there is a an adress in a phisical memory and available that it is not used by an other program? But then why do they set the attributes in the tutorial to 011(supervisor,R/W,present) and not to 111 00 0 0 00 0 1 1 (available,supervisor,R/W,present)?

-And what does "dirty" mean?

Ty.
Last edited by LegendDairy on Thu Nov 11, 2010 8:09 am, edited 1 time in total.
User avatar
Artlav
Member
Member
Posts: 178
Joined: Fri Aug 21, 2009 5:54 am
Location: Moscow, Russia
Contact:

Re: Questions:Paging

Post by Artlav »

Legendmythe wrote:-Now I was wondering what's the difference between available and present?
Available as in availale for the OS to use as it pleases. That article mentions it, btw.
Legendmythe wrote:-And what does "dirty" mean?
In short, means that the page have been written to.

More verbose explanations can be found in the OSDev wiki:
http://wiki.osdev.org/Paging
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

Re: Questions:Paging

Post by LegendDairy »

Artlav wrote:
Legendmythe wrote:-Now I was wondering what's the difference between available and present?
Available as in availale for the OS to use as it pleases. That article mentions it, btw.
Legendmythe wrote:-And what does "dirty" mean?
In short, means that the page have been written to.

More verbose explanations can be found in the OSDev wiki:
http://wiki.osdev.org/Paging
Oke thanks but i got 1 last question so if I would enable multitasking and in the kernel I say these pages are your and are RW and in the first program I say the kernel pages are only R but these pages you can use. Would that prevent them from messing around in the wrong memory or would it just not work at all?
rdos
Member
Member
Posts: 3286
Joined: Wed Oct 01, 2008 1:55 pm

Re: Questions:Paging

Post by rdos »

Legendmythe wrote:Oke thanks but i got 1 last question so if I would enable multitasking and in the kernel I say these pages are your and are RW and in the first program I say the kernel pages are only R but these pages you can use. Would that prevent them from messing around in the wrong memory or would it just not work at all?
The pagefault handler. It is invoked when code references a page that is not present, or if an R/W (or user/kernel) violation is made. Read the section in the Intel manual about it. It covers it in-depth.
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

Re: Questions:Paging

Post by LegendDairy »

rdos wrote:
Legendmythe wrote:Oke thanks but i got 1 last question so if I would enable multitasking and in the kernel I say these pages are your and are RW and in the first program I say the kernel pages are only R but these pages you can use. Would that prevent them from messing around in the wrong memory or would it just not work at all?
The pagefault handler. It is invoked when code references a page that is not present, or if an R/W (or user/kernel) violation is made. Read the section in the Intel manual about it. It covers it in-depth.
K ty.
Post Reply