Page 1 of 1

Picking hardware architecture for the OS

Posted: Thu Nov 03, 2011 8:07 pm
by nulik
I am designing my OS for a custom application, and I chose x86-64 architecture because I think it is the cheapest. (also more popular and known) And when i started to get into the processor internals, a question arised: Is x86-64 a good choice? Maybe I should switch to ARM?

But the real question goes more like this:

If we remove popularity of the brand, which architecture is the best in terms of performance and cost (hardware and energy consumption) , including available peripherals on the market, like network adapter or SATA interface? When I say performance, I mean the actual work, not instructions executed, because on Intel you can multiply 4 numbers with 1 cycle using SSE, but I don't know if you can do this on ARM?

If you have an advice or comment about your choices for picking the architecture for your OS, please post it.
Also if you have any link/reference, share.

Thanks in advance.

Re: Picking hardware architecture for the OS

Posted: Thu Nov 03, 2011 9:16 pm
by thepowersgang
Despite the popularity ARM is gaining, ARM hardware is still varied and relatively rare. For this reason, if you are aiming at desktop development, I suggest going with x86-64, but try to keep the architecture specific code separate, so you can port to ARM eventually. (I'm currently running parallel builds between x86, x86-64 and ARMv7)

Re: Picking hardware architecture for the OS

Posted: Fri Nov 04, 2011 2:43 am
by bonch
nulik wrote:I am designing my OS for a custom application, and I chose x86-64 architecture because I think it is the cheapest. (also more popular and known) And when i started to get into the processor internals, a question arised: Is x86-64 a good choice? Maybe I should switch to ARM?

But the real question goes more like this:

If we remove popularity of the brand, which architecture is the best in terms of performance and cost (hardware and energy consumption) , including available peripherals on the market, like network adapter or SATA interface? When I say performance, I mean the actual work, not instructions executed, because on Intel you can multiply 4 numbers with 1 cycle using SSE, but I don't know if you can do this on ARM?

If you have an advice or comment about your choices for picking the architecture for your OS, please post it.
Also if you have any link/reference, share.

Thanks in advance.
I've been having the EXACT same discussion with myself for the last two weeks. x86-64 seems like an awful lot of complexity to take on - not just the instruction set, but also the peripherals like you say. The amount of driver code you would need to make the motherboard usable is exhausting. To make a modern motherboard impressively usable (i.e. accelerated graphics etc) it must take years. So why not make an OS for a phone?? The only reason I can think of is that its hard to find the specifications.

Re: Picking hardware architecture for the OS

Posted: Fri Nov 04, 2011 5:30 am
by nulik
thepowersgang wrote:Despite the popularity ARM is gaining
I started to look at ARM yesterday and found that many analysts predict ARM could win to Intel on desktops, so in a couple of years (or decades) it could be distributed like this:
ARM: Desktop and Mobile industry
Intel: Servers
Sparc & PowerPC: special and custom solutions

http://vanshardware.com/2010/08/mirror- ... ersus-x86/



====================

Re: Picking hardware architecture for the OS

Posted: Fri Nov 04, 2011 5:35 am
by nulik
berkus wrote:ARM is not in any way simpler.
PowerPC is not in any way simpler.
MIPS is not in any way simpler.
It is not about complexity it is about performance
Write portable code and do not depend on the architecture too much.
Why to write code for many architectures if you can pick the best and forget the others? Then even writing in assembly is justified.

Re: Picking hardware architecture for the OS

Posted: Fri Nov 04, 2011 5:40 am
by Solar
Might be, might be.

Yet still there is Linux and NetBSD, both of which very impressively demonstrate how OS architecture can function well across widely different hardware architectures.

Go with whatever sits on your desk as platform, but isolate the platform-dependent parts so you can adapt to changing hardware.

You don't even have to have a "portable" OS in mind, as in "runs on a wide variety of platforms today". Just imagine how much hardware might change in the years you will need to implement your OS, and you will realize that "portability" in the sense of "runs on the most common hardware tomorrow" should be part of your concept.

Re: Picking hardware architecture for the OS

Posted: Fri Nov 04, 2011 5:53 am
by Combuster
Long answer:
In the end, any device you want to use needs a device driver. You can get a prebaked x86 motherboard and only write something for the things you really need, or you can design your own and only have the hardware you need. In all those cases, the amount of programming effort is basically identical.

So since that can't be the issue, the next criterion would be power efficiency and availability (if you need a standard, try integer ops/wattsecond), in which case it becomes rather obvious that x86 is beaten effortlessly by ARM. I don't know much details about ppc/mips/superh TDP ratings by hard, but I expect them to be somewhere halfway between the two. For experimentation purposes, ARM has the widest range of consumer-range developable equipment, and would be a logical starting choice for power-efficient hardware with decent computation power. After all if you only need low power, you can go to the 10MHz AVRs and PLCs (or even resort to nothing at all 8)).

As far as vector ops are concerned, several earlier ARM SoC's came with a dedicated DSP core for math-heavy work which might be a good idea if you want to go to efficient numbercrunching. More recent cores have integrated vector units. The same goes on PCs - the real number cruncher is the GPU, and it's usually much more efficient at it. If numerical performance is the actual issue, grab a Cell processor if you want big work for little power.

Re: Picking hardware architecture for the OS

Posted: Fri Nov 04, 2011 6:45 am
by ACcurrent
Have a look at a beagle board. Uses the arm CPU. However x86-64 does not sound too bad (except that it is a power hogger).

Re: Picking hardware architecture for the OS

Posted: Sat Nov 05, 2011 11:46 am
by nulik
ok, I got it and I took the decision (after doing some brief research):
I am going to target for x86-64 and use AMD hardware (because it is cheaper), but write portable code (i.e C) with future thinking on migrating it to ARM.

Topic closed.