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.
Picking hardware architecture for the OS
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Picking hardware architecture for the OS
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)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: Picking hardware architecture for the OS
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.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.
Re: Picking hardware architecture for the OS
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:thepowersgang wrote:Despite the popularity ARM is gaining
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
It is not about complexity it is about performanceberkus wrote:ARM is not in any way simpler.
PowerPC is not in any way simpler.
MIPS is not in any way simpler.
Why to write code for many architectures if you can pick the best and forget the others? Then even writing in assembly is justified.Write portable code and do not depend on the architecture too much.
Re: Picking hardware architecture for the OS
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.
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.
Every good solution is obvious once you've found it.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Picking hardware architecture for the OS
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 ).
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.
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 ).
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
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).
Get back to work!
Github
Github
Re: Picking hardware architecture for the OS
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.
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.