are 2 sets of segments needed?

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
srg

are 2 sets of segments needed?

Post by srg »

Hi

I was wondering, in a protected mode os there are at least 4 segments, flat of course over the 4GB address space.

Why not just have the supervisor mode segments used for user mode code with all protection using paging.

Would it muck things up?

thanks
srg
bakery2k

Re:are 2 sets of segments needed?

Post by bakery2k »

Someone correct me if I'm wrong, but AFAIK the privilege level of the current code segment defines the current privilege level. Thus, if you only have supervisor code segments, you will always be running code in supervisor mode. So, page protection attributes will be ignored - supervisor code can read and write all pages.
Post Reply