LWN.net Logo

Portability

Portability

Posted Oct 10, 2008 8:32 UTC (Fri) by eru (subscriber, #2753)
Parent article: Linux at 17 - What Windows promised to be (the Register)

The Register article makes much of how portable Linux is, but interestingly that was not originally a goal in Linux at all! In the famous Torvalds-Tanenbaum debate (1), Tanenbaum complained how the Linux implementation was closely tied to the x86 and predicted that other CPU architectures will replace it, but Torvalds argued that does not matter at all as long as the kernel sticks to the POSIX standard API, implying that other architectures should use other POSIX-compatible kernels than Linux.

The funny thing is that x86 is still alive and well, but Linux nevertheless has got ported to lots of other architectures. I guess this shows that Tanenbaum was right about at least one thing: making a good OS kernel is such a big job that creating entirely separate architecture-specific kernels is wasteful.

(1) Copies can be found in many places, one is here: http://oreilly.com/catalog/opensources/book/appa.html


(Log in to post comments)

Portability

Posted Oct 10, 2008 22:30 UTC (Fri) by Wol (guest, #4433) [Link]

Can't remember where it is - I remember Linus saying that you should design your kernel to sit on an "ideal processor". If the processor can't implement that feature, you then put an emulation, or HAL, layer between the kernel and the hardware.

Doing that usually results in a design that is not only simpler to maintain, but actually also usually works better than a design targeted at sub-optimal hardware!

(He didn't word it quite like that, but that's the gist... I think it was in a discussion about the port to Alpha)

Cheers,
Wol

Portability

Posted Oct 11, 2008 18:47 UTC (Sat) by drag (subscriber, #31333) [Link]

Well the Linux design for portability is to design the kernel to work on a 'generic' kernel.. that is design it to run with concepts that all processors and platforms generally support, then implement architectural specifics to 'port' the kernel to different platforms.

Portability

Posted Oct 13, 2008 23:37 UTC (Mon) by ncm (subscriber, #165) [Link]

Linux ended up completely different from what Tanenbaum recommended or Torvalds designed. It turns out you really can't anticipate what future processors will be like (not even x86!). Instead it relies, ultimately, on an army of developers to rewrite major subsystems as needed. Lately that means adapting it to the (what now seem bizarre) needs of thousands of cores.

Tanenbaum's approach may ease porting from one CPU (actually, MMU) to another, but it's almost completely useless -- even, Linus might argue, actively harmful -- for what has actually had to be done.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds