Page 1 of 1

Protected Mode vs. Unreal Mode

Posted: Thu Nov 01, 2001 12:00 am
Dear Folks,
Hello. Does anyone have any opinions regarding whether protected mode or unreal mode faster? Clearly, less overhead is produced with unreal mode, but are there general speed improvements in using 32-bit code instead of 16-bit code with 32-bit addressing (the Intel optimization manuals seem to suggest 32-bit code is faster, but they may not be considering unreal mode)? Are there any reasons specific to SMP kernels to prefer protected mode? The kernel I am writing is dedicated to a specific application, so a general purpose protected mode application/kernel split does not seem particularly applicable (currently I am using unreal mode). Thank you very much for any information that you can provide on this subject and please have a nice day.
Sincerely,
[email protected]

RE:Protected Mode vs. Unreal Mode

Posted: Mon Nov 05, 2001 12:00 am
by Chase
>On 2001-11-01 12:14:02, [email protected] wrote:
>Dear Folks,
>Hello. Does anyone have any opinions regarding
> whether protected mode or unreal mode faster?
> Clearly, less overhead is produced with unreal
> mode, but are there general speed improvements
> in using 32-bit code instead of 16-bit code with
> 32-bit addressing (the Intel optimization manuals
> seem to suggest 32-bit code is faster, but they may
> not be considering unreal mode)? Are there any
> reasons specific to SMP kernels to prefer protected mode?
> The kernel I am writing is dedicated to a specific
> application, so a general purpose protected mode
> application/kernel split does not seem particularly
> applicable (currently I am using unreal mode).
> Thank you very much for any information that you
> can provide on this subject and please have a nice day.

If it's always going to be used with a specific app then there
isn't really any difference. PMode is all about memory addressing.
If you don't need to switch tasks then unreal mode could work.

Unless my mind has slipped you can use most 32-bit code in real and
unreal mode, just the addressing is affected not opcodes
(for the most part)that you can use. So the speed issue shouldn't be
16 v.s 32. The biggest slow down you see is in Pmode task switching
changing out the TSS) but you don't have to use that just because you
are in Pmode.

Personally I think unreal mode is just too much a pain when it comes to
designing a virtual memory system or setting up interrupr handlers.

-Chase
you don't have to use that just because you are in Pmode