Win9x memory protection

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
ManOfSteel
Member
Member
Posts: 60
Joined: Tue Feb 01, 2005 12:00 am

Win9x memory protection

Post by ManOfSteel »

Hello,

Why are system structures like the GDT and the IDT under Win9x unprotected, allowing the user to alter and overwrite sensitive data. How were the paging system and memory protection implemented.

Thank you in advance.
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

I believe they go unprotected to provide backwards-compatibility with DOS.

Yes, it's a horrible design. Let's not emulate it.
User avatar
ManOfSteel
Member
Member
Posts: 60
Joined: Tue Feb 01, 2005 12:00 am

Post by ManOfSteel »

I believe they go unprotected to provide backwards-compatibility with DOS.
How so? I know they use some "dirty" tricks like hidden API with ordinal values only or VxD calls inside kernel32.dll and similar libraries to call old DOS functions (as wrappers), but what does this have to do with memory protection (eg: paging)?
Let's not emulate it.
Don't worry I won't. I just want to know why it works so bad. What mistakes did MS do, what protections did they badly implement, what did they miss.
So could you give more explanations? I found nothing on google.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Crazed123 wrote:I believe they go unprotected to provide backwards-compatibility with DOS.
I think it has more to do with 16-bit Windows compatibility than DOS compatibility. DOS apps run in V8086 mode in Windows 9x, while Win16 apps all expect to run in the same (16-bit) protected-mode address space (although they use different segments for some things).
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

Colonel Kernel wrote:
Crazed123 wrote:I believe they go unprotected to provide backwards-compatibility with DOS.
I think it has more to do with 16-bit Windows compatibility than DOS compatibility. DOS apps run in V8086 mode in Windows 9x, while Win16 apps all expect to run in the same (16-bit) protected-mode address space (although they use different segments for some things).
Ooohhh...

And the problem really comes more from the protection mechanisms that they didn't implement than the ones they did.
Post Reply