July 02, 2019

Windows is a firmware, not a development environment


What is the main difference between Linux and the rest of the world? Right, Linux is an operating system while the rest of the world is an embedded system. The difference is easy to explain. The term operating system is used for a software which runs on multiple hardware (ARM, x86, Power8), provides a standard (POSIX), is maintained longer than 10 years (Linux was initiated in the 1990s, Unix in the 1970s) and is used by programmers but not by the enduser.
If Linux is an operating system what is the correct name for the Commodore 64 kernel, the Mac OX X Systemsoftware, the Windows 10 environment and iPhone OS? They can be called firmware, or host plattform. Which describes very well what the development workflow is. Software is programmed, bugfixed and compiled on the host which is a Linux Workstation or better, a Linux supercomputer with thousands of Cores. And then the sourcecode is compiled for the host platform which is a Windows 10 system, a Nintendo gaming console or the Mac OS X environment.
This pipeline works from top to the buttom but can't be redirected in the opposite direction. For example, Mac OS X has some great features, but it is not a development enviornment for producing software. It is some kind of firmware to start the executable which were developed outside the Apple universe.
The reason why all the Windows 10 fanboys, iphoneOS users, gameboy experts and Mac OS users are argue against LInux is because they are arguing against an operating system. They don't like the idea that something is available on which they are depended. So they are argue, that their firmware which runs on dedicated hardware should be called an operating system as well. Microsoft for example call their WIndows 10 product an operating system, and they know that the term is wrong. Windows 10 can't run on a supercomputer, doesn't provide a standard API and was never invented as a programming platform. It didn't even has a bash.
But that is ok, by definition a firmware or the host system has not the oblication to act as a programmer friendly environment. The only feature which is needed is, that it can execute software written by others. Especially software which is copyright protected and is sold on the market. The best example for such a firmware is the Nintendo WII console. It has some built in firmware which boots the system and runs a ROM file. The firmware was never designed as an operating system. And Nintendo customers are not interested in such a featureset.
The reason why operating systems are important is because on one place all the programs has to be developed. And this is Linux. LInux is the location in which the software is written which runs on Mac OS, Windows and Nintendo systems. Linux is by defintion an operating system and has to fulfill different needs than a simple firmware. That's the reason why Linux seperates between GUI and kernel, why Linux has many development tools and is the prefered choice for all the game developers and system engineers around the world.
A typical LInux system runs on a supercomputer, has endless amount of ram and compiles for other target platforms. That means, the Linux compiler takes the sourceode and produces a binary which runs on a non Linux system. That is the best practice method for creating software. Using Windows to develop Windows software is a best practice method and fails mostly.
Let us answer a simple question: why is the market share of Linux on the desktop less than 1%? Because the mainstream doesn't need an operating system. They are satisfied with their firmware which is maintained by Microsoft or Apple. They go to the computer store, buy a pc and get a vendor specific embedded system. The software on the PC can't be changed it is fixed and the customer has no need for additional features. He is using the PC similar to a nintendo Gaming console, which means he runs the ROM files developed by somebody else. The typical Nintendo WII user has never the idea to put Linux on the machine and he will never install Linux on a PC. Because this is equal to install an operating system and this is something which is too complicated.
Let us investigate a different question: is it possible to install on a WIndows 10 machine a compiler and produce a executable file for a Linux machine? This is more complicated to answer. Installing a compiler on Windows is risky. Some compilers were written but it's not very common. With a bit research it's possible in doing so, but the overall pipeline doesn't make much sense. Because Windows 10 is the restricted system while LInux is the operating system. So it would feel like a hack but not like a normal operation. The more comfortable idea is to compiler Windows executable on a Linux system, test it in a virtual machine and then deploy the software on a real machine. This pipeline makes more sense, because Linux is the more powerful tool. It was developed mainly for this purpose and it is possible to install it on powerful hardware which is able to emulate Windows, Mac OS and any other embedded system.
In the past, a labeling of firmware into operating system was common. The Commodore 64 kernel, the MS-DOS system and the iphone firmware was called an operating system. The term operating system is reseerved for a powerful software which forms a standard. And the kernel in the commoore 64 computer is by sure not a standard. While the MS-DOS program has no ability to connect to a network. Calling these software a full blown developer friendly operating system is some kind of misinterpretation.
The fact is, that all these system never were invented as an operating system. Their purpose was to boot a single computer and provide a limited amount of features. For example, the Commodore 64 was never invented as developer machine to program software and compile software. Instead the idea was, that the enduser can play software which was crosscompiled for the Commodore 64.
The same is true for modern embedded software like Mac OS X, Windows 10, iPhoneOS, and the Nintendo WII master program. All these software is deployed as a restricted environment for the enduser. It was not the intention to build an operating system comparable to Linux. So it is a bit funny to compare Linux with Mac OS X. It is similar to compare a firmware with an operating system. Somebody would argue, that Mac OS X is the more friendly system and that he prefers it over Linux, but that is a subjective judgment and doesn't declare Mac OS X into an operating system which was invented to support software development.
Let us go a bit into the detail. A Linux system which runs on a supercomputer can be utilized as a development platform for creating new software for all the hardware on the market. It is possible to crosscompile software for iphoneOS, Windows, MacOS, Commodore 64 and Amiga 500. This pipeline works only in one direction. That means, it is not possible to use Windows 10 to program new Linux software. THat means, it is a hierarchy, on top is the operating system namely Linux and outside of Linux are the consumers who are running the software but not make a contribution.
A comparison makes only sense between similar systems who are on the same level. Windows 10 and Linux are not on the same level. Windows 10 is a simple firmware which runs on x86 hardware and locks in the user into a sandbox.
Let us take a look how new iphone OS software is written. According to a myth this is done on imacs or Powermac computers right? No that is not the toolchain. What is used in reality is Linux as a development system and clang as a cross compiler. The details are explained here https://docs.godotengine.org/en/3.1/development/compiling/cross-compiling_for_ios_on_linux.html
Basically it's a tutorial how to configure the clang compiler which is installed on a Linux workstation to produce iphone binary files. It's not a hack or something which is not common, but it's the opposite. That is what iphone developers are doing all night long. The reason is, that they can not program software on the iphone and even the Mac OS X system is not able to compile for the iphone. Only a dedicated Linux platform is powerful enough and brings the right tools for the job.
The problem is, that programming is only possible under an operating system. And apart from Linux no other operating system is available, especially not a standardized one which runs on powerful hardware. That means, Linux is some kind of giant which is everywhere and that is the reason why all are arguing against the system.
Let us go a step backward and describe a development computer. What a developer needs is some kind of workstation. It has usually 100 Terabyte of RAM, equal to a supercomputer or at least a mainframe and the machine costs million of US$. This is the prefered choice what all the software companies are using internally to program new software. And now we ask an interesting question. Which operating system can be installed on such a hardware? Will the Mac OS X or the Amiga 500 kernel run on this machine? No, the only available OS is Linux. Linux provides a standardized filesystem, can adress hundred of CPUs, brings a powerful compiler collection and has a shell for starting all the software.
The more interesting question is why there is a difference between operating systems and embedded systems. Wouldn't it make sense to install an operating system on enduser hardware as well, for example on a microcontroller or on a gaming console? Exactly this is the open question. What does the customer needs? Does he needs a fullblown powerful operating system which comes with a preinstalled coompiler and a standard API or does he needs a restricted slimdown embedded system?
According to the amount of sold products, the customer has no need for a operating system. He is happy with an embedded system which is taylored to the custom hardware. He doesn't need access to the sourcecode, doesn't need a shell and has no interest in installing self programmed software. Is the customer wrong if he buys a Nintendo WII console which runs only WII games but nothing else? Has the customer made a bad decision if he buys a closed system like the imac which can't be upgraded?
My answer is, that the customer has a need for embedded system. And Linux is not an embedded system but an operating system so it's normal that the customer has no need for Linux. The only exception is, if the customer likes to use a device as a supercomputer for creating new software. Then he has a demand for an operating system.
Firmware for a microcontroller
It make sense to describe in detail what a firmware is, The FreeRTOS project is a great example. It is a firmware which runs on microcontrollers like the PIC. The idea is, that somebody is using a full blown Linux workstation for creating the software, uses a target compiler and then puts the binary file together with the RTOS system on the PIC hardware. Then the product is delivered to the customer for driving a simple clock or monitor the temperature.
From the name itself, FreeRTOS calls themself an operating system, similar to Windows 10, but it's only a firmware. That means, RTOS is stripped down version in which only the needed parts are available to run the software. In term of a cross compiler toolchain, RTOS is the host computer which executes the binary file. The software has to be written somewhere else.
It make sense, to put larger systems like QNX, AmigaOS and Windows 10 into the same category like FreeRTOS. All of them are firmware system which provide strip down functionality. Important parts to develop software for example a compiler, a bash and programmer friendly tools are not available. In case of Windows 10, they can be installed later for example with the cygwin project, but this is only a bad replacement for a real Linux machine.
The funny thing is, that the separation is not a problem. It's ok to call the RTOS system a strip down software and use it as a firmware. Because for this special need the software is great. A normal fullblown Linux system would never fit onto the small microcontroller.And the same is true for the latest Mac Pro computer from apple which is sold for 15000 US$. The device is not powerful to run a full blown Linux environment, and only the mac os Firmware is preinstalled.
It's correct that the Mac Pro is the most expensive product from Apple, but a computer for develooping new software costs much more. The average mainframe computer costs around 1 million US$ sometimes more. Such a system is able to emulate Apple and all other products in the background.
PIC controller calculator
A typical problem for a PIC device is to build a calculator. The overall system contains of a simple cpu, an led display and a bit of c code. The user can type in numbers and get all the features he can expect from a calculator. Such systems are usually realized as an embedded device which is equiped with a firmware. The total amount of RAM is small and the hardware should run only the calculator application and nothing else.
Using not an operating system but a simple firmware is the best practice method here. It makes no sense to install a complex operating system on a PIC device if the goal is provide only a calculator. The underlying hardware is not the only criteria but it has to do with the usecase as well. The typical user of the machine is not interested in programming new applications for the calculator but he only want's to add two numbers.
This example helps to understand what a modern Windows 10 PC is designed for. It is similar to a PIC microcontroller a restricted machine with a certain purpose. The idea behind a Windows 10 computer is, that the consumer buys 5-10 addtional games in the store, install some office programs but nothing more. That means, the enduser doesn't need an operating system on the machine but a simple firmware, similar to a PIC microcontroller. The resulting product is not very powerful, it provides only restricted capabilities. But that is not a problem for the enduser. He is using the Windows machine similar to a gaming console.
It's important to understand the reason why a PIC controller and a windows machine was produced. Because this effects the development cycle. Suppose somebody likes to deplay new software for the PIC calculator or the Windows 10 machine. Does it make sense to program the sourcecode on the machine itself? No it won't work. The PIC controller doesn't has an onboard compiler and the Windows 10 computer has the same problem. Software development is done outside of these machines on a dedicated development system which is working with a cross compiler. The best practice method for creating Windows 10 software is to use a Linux mainframe system which provides endless amount of RAM, and use the GCC compiler suite.
Using the wrong tools
How great is the productivity, if somebody is using the Commodore 64 for compiling sourcecode, using the Nintendo gameboy for editing sourcecode or using a Windows 10 computer for creating C++ code? Right, not very high. From a technical side it is possible in doing so, for example the Commodore 64 provides some older C compilers, but this pipeline is not recommended for daily usage. It is done only if a real development system which runs with a powerful operating system isn't available. That means, if somebody has no Linux machine with a C compiler, he can compile a simple hello world program on a Nintendo gameboy as well as a proof of concept.
It make sense to understand why the Linux operating system and why supercomputers were invented. Because the programmers need special environment for creating new software. The tools they need are usually compilers, standardized libraries, a GUI, network access and a powerful filesystem. Somebody may argue, that the Commodore 64 has a filesystem and it's even possible to argue, that the GUI of the Commodore 64 which is called GEOS is more user friendly than the X11 system which is provided by Linux. That means, the single person can explain, that he likes the Commodore 64 more than a Linux machine. But this is not an objective description but a judgement which is equal to telling a story. It is some kind of rant against Linux and against operating systems in general.
Let us go a step backward and ask if there is need for a development system. Wouldn't the work much better, if no supercomputers and no C compilers at all are available? This is equal to a standstill. If nobody creates new software, everything remains the same. Is that the reason why Linux is hated so much, because it moves the world forward?
The most interesting difference between a development computer and a enduser computer is, that the amount of needed machines is different. Software programing is done by few people. The resulting software is installed on millions of computers. Suppose the world contains only of 1000 Linux machines worldwide. These machines are used to create new applications, games and smartphone apps. At the same time 4 billion enduser devices are available which doesn't have an operating system but different firmwares. Such an ecosystem would work great. The small amount of programmers are creating on their Linux machines the software and this software is deployed on all the embedded devices. What is the market share of Linux under such a constraint? The naive approach is to treat the development machines and the end-user machines as the same, then the Market share of Linux is around 0.00003 percent. The more realistic measurement is define, that software development and executing software are done on different machines. The market share of Linux is 100% and at the same time, the market share of Linux is 0% on the enduser devices.
Windows as a development machine?
In the internet there are some discussions how to use Windows 10 as a developer computer. Sometimes the idea is to use Visual studio, while other are argue that The Windows Subsystem on Linux has to be installed first. But what are using developers in the wild, have they are Windows 10 installed?
To describe the developers need we have to describe a serious environment. The term software development was used in the history of computing for programmers who had access to mainframe computers. A developers doesn't sits on a gaming console but on a IBM mainframe system which has 10 terabyte of RAM. He is able to run on that machines multiple instances at the same time. He is not using end user hardware, because these computers are not powerful enough. Which operating system will run on the latest IBM zmachine? Right, only Linux will run on this machine. Windows or Mac OS is not powerful enough.
What i want to explain is, that all developers are using mainframe computers for 1 million US$, have installed Linux on the machine and using the GCC compiler for creating new software. There is no debate about potential alternatives to this technology and the description from the beginning of using Windows 10 as a developer workstation is a joke. If a Windows 10 machine would be powerful enough for programming software, why does IBM is selling these powerful mainframe machines plus the Linux OS to their customers?
Let us take a look into the literature which computer technology was used in the 1980s and 1990s to develop software. Most description which are published are telling a story of individuals who have programmed on homecomputers. That means, they have programmed on the Atari ST for the Atari ST, they have programmed on MS DOS for MS DOS. This story is not completely wrong, because some beginners have done so. But it is not the fully story, because it reduces software development to a indie development in which a single student without much money and without a professional background is trying to write a hello world program. Real software was developed in the 1980s and 1990s within companies like Atari. And by sure, Atari doesn't used an Atari ST for programming software for the Atari ST. The common pipeline was to use cross development tools. That means, the programmers worked on mainframe computers which costs million of US$ and only the resulting binary file was deployed on the enduser hardware.

No comments:

Post a Comment