{"id":504,"date":"2007-12-06T11:52:44","date_gmt":"2007-12-06T11:52:44","guid":{"rendered":"http:\/\/scienceblogs.com\/gregladen\/2007\/12\/06\/why-is-linux-better\/"},"modified":"2007-12-06T11:52:44","modified_gmt":"2007-12-06T11:52:44","slug":"why-is-linux-better","status":"publish","type":"post","link":"https:\/\/gregladen.com\/blog\/2007\/12\/06\/why-is-linux-better\/","title":{"rendered":"Why is Linux Better?"},"content":{"rendered":"<p>Better than <em>what<\/em> you may ask?  Better than:-Older versions of LInux &#8230; it is always improving.-Windows.  Hands down.-Apple&#8217;s operating system before Apple chose, essentially, Linux (a Unix variant) to run its eye candy and development environment onBut why, specifically, is it better?<!--more-->One reason, apparently, is because the Linux Kernel does not have a stable API.So what, you ask, is a Kernel and\/or an API?  Very simple:  The Kernel is the guts, the most basic part, the way-down way-down of the operating system.  What is the API?  That stands for Application Programming Interface.  The API is a list of &#8220;functions&#8221; that a computer program can use.  For instance, this may be found in the programmer&#8217;s manual for a fictional  API of some computer system:<strong><\/p>\n<blockquote><p>USB_check(port#)<\/strong>port# is the number of the port to check for a USB device.  This function exists only for backward compatability. You should use USB_IsIt(port#).<strong>USB_New_Check(port#)<\/strong>Port# is the number ot he port to check for a USB device.  This function exists only for backward compatability.  You should use USB_IsIt(port#)<strong>USB_IsIt(port#)<\/strong>Port# is the number ot he port to check for a USB device. Returns an internal file handle for the USB device if it exists.  Returns 0 if no USB device is attached.  Returns -9 if the device reports an error.<\/p><\/blockquote>\n<p>Obviously, I made all this up, but it demonstrates something that can happen with an API.  If you have an API then everyone uses it, you can&#8217;t really edit the API later.  You have to leave all those functions you put in there in place, although of course you can add to it (but very very carefully, in some cases&#8230;)  A &#8220;stable&#8221; API is an API that will grow and grow and grow and that will always include code that has been replaced for some reason or another.Check this out:<\/p>\n<blockquote><p>The Linux USB code has been rewritten at least three times. We&#8217;ve done this over time in order to handle things that we didn&#8217;t originally need to handle, like high speed devices, and just because we learned the problems of our first design, and to fix bugs and security issues. Each time we made changes in our api, we updated all of the kernel drivers that used the apis, so nothing would break. And we deleted the old functions as they were no longer needed, and did things wrong. Because of this, Linux now has the fastest USB bus speeds when you test out all of the different operating systems. We max out the hardware as fast as it can go, and you can do this from simple userspace programs, no fancy kernel driver work is needed.Now Windows has also rewritten their USB stack at least 3 times, with Vista, it might be 4 times, I haven&#8217;t taken a look at it yet. But each time they did a rework, and added new functions and fixed up older ones, they had to keep the old api functions around, as they have taken the stance that they can not break backward compatibility due to their stable API viewpoint. They also don&#8217;t have access to the code in all of the different drivers, so they can&#8217;t fix them up. So now the Windows core has all 3 sets of API functions in it, as they can&#8217;t delete things. That means they maintain the old functions, and have to keep them in memory all the time, and it takes up engineering time to handle all of this extra complexity. That&#8217;s their business decision to do this, and that&#8217;s fine, but with Linux, we didn&#8217;t make that decision, and it helps us remain a lot smaller, more stable, and more secure.<\/p><\/blockquote>\n<p>This is a quote from <a href=\"http:\/\/www.kroah.com\/log\/linux\/ols_2006_keynote.html\">Greg Kroah-Hartman<\/a>.In a proprietary model, you can&#8217;t rewrite downstream from important upstream changes.  And, people working down stream can&#8217;t (often) know what is actually in the code upstream, so they can&#8217;t make helpful suggestions.  In the OpenSource model, there is a lot of collaberation.As a result of this, with respect to USB connectivity, Linux is the <em>least broken<\/em> and the <em>fastest<\/em> of all operating systems on the planet earth.So it&#8217;s better.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Better than what you may ask? Better than:-Older versions of LInux &#8230; it is always improving.-Windows. Hands down.-Apple&#8217;s operating system before Apple chose, essentially, Linux (a Unix variant) to run its eye candy and development environment onBut why, specifically, is it better?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"1","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[67,130,57],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p5fhV1-88","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts\/504"}],"collection":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/comments?post=504"}],"version-history":[{"count":0,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts\/504\/revisions"}],"wp:attachment":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/media?parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/categories?post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/tags?post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}