Protected Mode vs. Unreal Mode

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
[email protected]

Protected Mode vs. Unreal Mode

Post by [email protected] »

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]
Chase

RE:Protected Mode vs. Unreal Mode

Post 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
Post Reply