Pmode and OS

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
Nby

Pmode and OS

Post by Nby »

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

Re: Pmode and OS

Post by roswell »

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
Tim

Re: Pmode and OS

Post by Tim »

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.
K.J.

Re: Pmode and OS

Post by K.J. »

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