Websites, mobile apps, desktop apps and mobile OSes are developed and updated using the desktop OSes, which I would call the ‘master OS’. But who updates the ‘master’? How do the devs upgrade Windows 10 to Windows 11 using Windows 10?

I have some experience in computing but software development for operating systems is completely mysterious for me. I have had this question ever since I learned about software development in general.

I saw Apple say how they use the Macs to build all of their other products and softwares, but they never answer how they build macOS itself. I understand how these companies could design an upgraded or a brand new computer by designing its new architecture as well as the circuitry and the components underneath with the help of a program like CAD. What I don’t understand is how they upgrade their existing software they themselves work in, especially when it has completely new features the old one doesn’t have. I feel like this is similar to a person performing a brain surgery on himself.

I would really appreciate if someone could ELI5 but only dumb it down enough for a person that understands how to really work with computers and knows the general theory of programming , like an amateur or the family IT guy.

  • Marek Knápek@programming.dev
    link
    fedilink
    arrow-up
    26
    ·
    1 year ago

    Oversimplified:

    • You have your current OS, text editor, compiler.
    • You write code of the new improved OS using your current OS, text editor.
    • You compile the code (text file), compilation yields the new OS or the new kernel (binary file).
    • You replace (overwrite) your current kernel by the new kernel (current OS by new OS). This is possible, because while the OS is running it is in RAM not touching the disk.
    • You restart.
    • BIOS loads the new OS from disk to RAM and executes it.
    • tada.wav

    More questions:

    • How to update BIOS? Answer: The same.
    • How the first OS, text editor and compiler were created? Answer: The same. Using more primitive OS, text editor and compiler each step into the past. At the beginning there were toggle switches, punch cards, punch ribbon strips or similar.

    The same style of question would be: How to create a hammer if in order to create a hammer you need a hammer? How was the first hammer created? Answer: By more primitive hammer, or something that is no hammer, but almost works as a hammer.

    For more info read about bootstrapping compilers. Or trusting the trust by Ken Thompson.

      • Marek Knápek@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        This is true in real world also, not only in computer world or programming world. Think of steam engine, it enabled sooo much progress in other fields. Also invention of lathe and precision measuring and engineering. Before that, invention of “simple machines” such as pulley, bolt/screw, windlass, lever. The same in math, physics, chemistry and so on.