Memory segmentation and paging
Posted: Wed Jul 28, 2004 3:22 am
Hello,
If I have, in my GDT, a code segment and a data segment that have limits of 0xffff, that means they both share the whole memory, right? So if this is the case, then code can be written in the same place than data which can be a problem. So how could I possibly solve the problem? Would I divide 0xffff by two and give the first portion to code and the second to data? Would paging be the answer to the problem? In a "paged" memory, can I still use segments exactly in the same way than without paging?
When using paging, on what basis do you choose the page directory? Is there a common place where to put it?
In a lot of tutorials, I see that they "fill in the page directory entries". What do they mean by that ("fill")? What is written to memory?
Also, in a multitasking system, where do we put a particuliar process? In a special segment created for it and then destroyed at the end of the process? In a couple of pages that will be freed at the end of the process? Other ways?
Thanks for any help.
If I have, in my GDT, a code segment and a data segment that have limits of 0xffff, that means they both share the whole memory, right? So if this is the case, then code can be written in the same place than data which can be a problem. So how could I possibly solve the problem? Would I divide 0xffff by two and give the first portion to code and the second to data? Would paging be the answer to the problem? In a "paged" memory, can I still use segments exactly in the same way than without paging?
When using paging, on what basis do you choose the page directory? Is there a common place where to put it?
In a lot of tutorials, I see that they "fill in the page directory entries". What do they mean by that ("fill")? What is written to memory?
Also, in a multitasking system, where do we put a particuliar process? In a special segment created for it and then destroyed at the end of the process? In a couple of pages that will be freed at the end of the process? Other ways?
Thanks for any help.