Linked by Nicholas Blachford on Wed 9th Jul 2003 16:43 UTC
Talk, Rumors, X Versus Y This article started life when I was asked to write a comparison of x86 and PowerPC CPUs for work. We produce PowerPC based systems and are often asked why we use PowerPC CPUs instead of x86 so a comparison is rather useful. While I have had an interest in CPUs for quite some time but I have never explored this issue in any detail so writing the document proved an interesting exercise. I thought my conclusions would be of interest to OSNews readers so I've done more research and written this new, rather more detailed article. This article is concerned with the technical differences between the families not the market differences.
Permalink for comment
To read all comments associated with this story, please click here.
Context Switching Faster in PPC vs x86
by hansnyc on Wed 9th Jul 2003 19:48 UTC

Interested, I checked out the website of MorphOS, in a paper about MorphOS "in Detail" it said the below. I think this would have been a big point in the article but it was not mentioned. Is it true and how does it work that it is 10x faster? And, more importantly, is that fast enough to provide a speedy OS?!

Thanks for the good article.

Microkernel Vs Macro Kernel

A common problem encountered in the development of microkernel Operating Systems is speed. This is due to the CPU having to context switch back and forth between the kernel and user processes, context switching is expensive in terms of computing power. The consequence of this has been that many Operating Systems have switched from their original microkernel roots and become closer to a macrokernel by moving functionality into the kernel, i.e. Microsoft moved graphics into the Windows NT kernel, Be moved networking inside, Linux began as a macrokernel so includes everything. This technique provides a speed boost but at the cost of stability and security since different kernel tasks can potentially overwrite one another’s memory.

Given the above, one might wonder why Q can be based on a microkernel (strictly speaking it’s only “microkernel like”) and still expected to perform well. The answer to this lies in the fact that MorphOS runs on PowerPC and not x86 CPUs. It is a problem with the x86 architecture that causes context switches to be computationally expensive. Context switching on the PowerPC is in the region of 10 times faster, similar in speed to a subroutine call. This means PowerPC Operating Systems can use a microkernel architecture with all it’s advantages yet without the cost of slow context switches. There are no plans for an x86 version of MorphOS, if this changes there will no doubt be internal changes to accommodate the different processor architecture.