Pmode and OS
Pmode and OS
It seems i386+ pmode did a lot that should be done by OS(paging,segment translation,protecting,task switching...),so if my OS relie on those,it would be hard for it to trans-platform?[glow=red,2,300]TEXT[/glow]
Re: Pmode and OS
Most CPUs provide paging, protection or task switching.
The only difference between them is the way they provide their services.
When you build an OS kernel, you can not avoid using built-in CPU functions or structures.
If you want to add portability to your OS, you will have to re-write low-level functions for each architecture. You must find a way to reduce these functions in your OS.
To conclude, I think it will be harder for you to find a way to manage memory or tasks without CPU built-in functions than porting your code to another CPU.
ROSWELL
The only difference between them is the way they provide their services.
When you build an OS kernel, you can not avoid using built-in CPU functions or structures.
If you want to add portability to your OS, you will have to re-write low-level functions for each architecture. You must find a way to reduce these functions in your OS.
To conclude, I think it will be harder for you to find a way to manage memory or tasks without CPU built-in functions than porting your code to another CPU.
ROSWELL
Re: Pmode and OS
Most CPUs only provide protection and paging; not task switching or segmentation. The x86 is slightly weird in this respect. If you want to program for maximum portability (especially for RISC architectures), don't assume hardware task switching and segmentation are present.
Re: Pmode and OS
Regardless of what you do, porting an OS from the PC to a Mac or Mac to PC will require writing of a lot of code(assembly registers aren't the same for different CPUs).
K.J.
K.J.