5 ms·
I don't think I'm explaining myself well. Can't the kernel be modified so that manufacturer-specific code can stay in-house? Let me give you an example: I don'
by euyyn 10y ago
I don't think I'm explaining myself well. Can't the kernel be modified so that manufacturer-specific code can stay in-house?
Let me give you an example: I don't need to fork my text editor to make it highlight and autocomplete any new programming language I invent myself. And I don't need to give the editor developers anything to work with either. Because they've put the needed hooks and interfaces in place for me to write my stuff without having to modify theirs.
- rogerbinns 10y ago> I don't think I'm explaining myself well. Can't the kernel be modified so that manufacturer-specific code can stay in-house? The kernel is under the GPLv2 so redistributing kernel binaries also requires making source available (that is all part of the "freedom"). The kernel internals constantly change. For example the USB stack was rewritten 4 times. Each time all the drivers etc were converted over. By contrast Microsoft has also rewritten their stack 4 times, but has to retain backwards compatibility for each generation of driver API/ABI, simultaneously! While in theory it is possible to have a stable API, in practise real life is more complicated. There are concurrency issues, power management, suspend/resume, memory allocation, constantly changing hardware etc. A stable API would result in way less optimal drivers (eg they may consume more memory or power, cause cores to run at higher speeds). The kernel developers decided they weren't going to have that layer of indirection. Instead drivers will do the one true correct thing (updated as kernel versions change). That makes them simpler, and perform better in the dimensions mentioned in the previous paragraph. That all said, Linux is fanatical about the userspace API to the kernel being stable. You can implement drivers (eg USB) and filesystems (eg FUSE) amongst other things in userspace. However they won't be as "good" as kernel drivers. Here is a good post from a kernel developer: http://www.kroah.com/log/linux/stable_api_nonsense.html http://www.kroah.com/log/linux/stable_api_nonsense.html To get an idea of what changes in the kernel, check out the LWN page. If you have interest in Linux, I'd recommend subscribing too. https://lwn.net/Kernel/ https://lwn.net/Kernel/
- euyyn 10y agoThank you for the explanation and the link to that article. I disagree with some of the philosophical statements, like: > While in theory it is possible to have a stable API, in practice real life is more complicated. (In practice it's also possible, as Microsoft demonstrated with Windows for decades). or (from the article): > benefits if your driver is in the main kernel tree, all of which has made Linux into such a strong, stable, and mature operating system which is the reason you are using it in the first place (The reality is, that wasn't enough of a reason to move users from Windows, before the smartphone era. Nor is it the reason Linux won over Windows in the smartphone market, either.) I think the article hits the crux of the issue, though: Nobody wants to spend their free time contributing to maintain an old interface, instead of working on the new one. A side effect of this policy is a better kernel, granted (for the devices that actually make it to the main tree). So given that a stable API isn't an option, and the current model is clearly not working, I guess the solution lies in solving the hurdles these companies face to upstream their code. Do you know about that, or where could I learn more?
- rogerbinns 10y agoMicrosoft only had to support one architecture, and continuously changed driver models. Except 32 and 64 bit. Plus you can't use drivers across Windows versions that much. But at the end of the day it was a financial decision by them to maintain a very large degree of backwards compatibility, and by their customers to pay that price. But also remember just how "sticky" Windows 98, XP etc were. People wouldn't give them up. Also have you tried to use USB 3 on Windows 7? Or how about skylake until the backpedal? Note that with Linux you can get more a semblance of Microsoft style stability. Use RHEL (redhat enterprise linux) and they do the work of backporting relevant drivers and changes. You also get to pay handsomely for that. Note that the majority of devices do make it to the kernel. You can plug in virtually anything and it works! You really should read LWN. They do a fantastic job of covering various issues. For example here is an article on hurdles: https://lwn.net/Articles/647524/ https://lwn.net/Articles/647524/
- euyyn 10y ago