Abt Mem mgmt model selection

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
kan
Posts: 19
Joined: Sat Jan 22, 2005 12:00 am
Location: India

Abt Mem mgmt model selection

Post by kan »

hi,
i m a bit confused about which memory model should i use in my OS.
My OS is just in design stage, Two options which i have are
1)Protected Mode Flat Memory model
2)Multisegment model.

According to what i have read in Intel manuals Multiseg model is more safer and robust, as i gives hardware protection(though a bit complicated).

On other hand Flat model is a bit easier but (i think) is not as robust as the previous one?

But it seems by using 'paging' even flat model can become safer and robust?

But i reallly want to experiment with Multiseg model, but the thing is that gcc
doesn't support Multiseg model it just support flat model!!!!
Is it so?????????

What do u think which mem model is the best for security ?????
And which C compiler should i use for the same?
[AlAdDiN]
Member
Member
Posts: 107
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: Abt Mem mgmt model selection

Post by [AlAdDiN] »

The compiler have nothing to do with the memory model, I'm using multiseg model with gcc...

multiseg model is more robust and s?cure because lot of inter-process protections are managed by hardware

in flat mode you have to manage all protections and ensure that one process can't access to other process' memory areas

paging can be used to add another protection level but once again multiseg+paging is better than flat+paging

now, it's up to u to choose witch model will be the best for your OS, and if you use paging, u can start with flat model then switch to multiseg model at any moment without breaking ur OS (but this depend on the flexibility of your paging system)
-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: Abt Mem mgmt model selection

Post by Legend »

Since the NX-bit in paging, you can do everything secure with paging.
Without the NX-bit you had to use segmentation to create areas that are not executable.
But you have to take care of everything basically yourself, by managing the page directories correctly. Then it should be equivalent in security.
*post*
Post Reply