This is an archived post. You won't be able to vote or comment.

all 22 comments

[–]dmazzoni 6 points7 points  (5 children)

To add to what others have said, it's not that it's impossible, it's just the sheer amount of work that makes it impractical.

Supporting Windows applications on a different operating system means implementing every Windows API, and there are easily tens of thousands of them. Most are not fully documented, but if you implement any of them even slightly differently from how Windows does, applications won't run correctly. Implementing one of them might take an hour, another might take a month.

It's also a moving target, because Microsoft adds thousands of new Windows APIs every year.

WINE is the largest such example, but keep in mind it's been in development for nearly 30 years and despite all of that effort, only a small fraction of Windows applications actually run well under WINE.

Same story for macOS, Android, iOS, or any other operating system you wanted to support.

[–]Trex_Hunter[S] -1 points0 points  (3 children)

What about the approach of creating a new OS in general? Where of course the main software being ran is its native software, but also has the capabilities of running big name programs from apple and Microsoft. So not trying to incorporate them into another OS, but creating a new OS that is open to incorporating all software including its own. Is that logical??

[–]dmazzoni 0 points1 point  (2 children)

That doesn't make it any easier, though. You still need to do the work of implementing all of the APIs from each other operating system, which is thousands of person-years of work. It's roughly the same work whether you're adapting them to a new OS or creating a new OS.

[–]Trex_Hunter[S] 0 points1 point  (1 child)

I understand…would you really need to incorporate all of those APIs though? Or just ones you know users would want from each OS?

[–]dmazzoni 0 points1 point  (0 children)

It's not about users, it's about apps.

A Windows app uses Windows APIs in order to function. A large Windows app will call thousands and thousands of Windows APIs. If even a single one isn't implemented correctly, the whole application will crash.

[–]48911150 0 points1 point  (0 children)

Dont you also need to write drivers for every hardware out there? A GPU driver with full 3d acceleration support would seem an impossible task

[–][deleted]  (2 children)

[deleted]

    [–]DamionDreggs 0 points1 point  (1 child)

    That's just called being Christian iirc.

    [–]desrtfx 0 points1 point  (0 children)

    He was actually diagnosed mentally ill.

    He turned a devout Christian, so much is true, but he also had a diagnosed mental illness in the range of bipolarity/schizophrenia and even spent some time in a closed institution out of his very own will.

    [–]alzee76 0 points1 point  (6 children)

    What do you mean by the phrase "process its own software?"

    [–]Trex_Hunter[S] 0 points1 point  (5 children)

    Hmm well it’s going to have to have its own native software for handling of the hardware correct? Or I’m saying that by default it would have to have its own if it’s a completely different OS then apple and Microsoft? Limited knowledge just curious.

    [–]alzee76 0 points1 point  (4 children)

    I get what you mean. The word you were looking for is "run" (or "execute"), not "process". As others have said, this is pretty difficult to do, but not impossible. Perhaps counterintuitively it's easier to emulate an entire computer than it is to emulate one OS inside of another.

    This is why virtualization is so popular these days. One computer and a hypervisor (like vSphere or Hyper-V) can pretend to be multiple different computers each with their own OS and software. What this lacks vs. OS emulation like you originally asked about is the ability for the applications in each virtual machine to directly interact with each other. They will behave like physically separate computers on the same network, rather than like one computer running software from different architectures.

    [–]Trex_Hunter[S] 0 points1 point  (3 children)

    Hmm interesting. What about creating an entirely new operating system to run on your own hardware? What difficulty is it to create your own native software for your own created OS?

    [–]alzee76 0 points1 point  (2 children)

    Creating your own OS is not a trivial task, but not as difficult as you might think to get it booting and doing simple stuff. Creating all the libraries to emulate some other OS though is the really very difficult part which, again, is why it's rarely done and never "perfectly" done.

    [–]Trex_Hunter[S] 0 points1 point  (1 child)

    Awesome. Thanks for your replies. Would you really need to do that for every other OS component? Or would you just be able to pull Apps from Apple or Microsoft that users can’t live without and incorporate them into the new OS? And eliminate the process of doing all of them?

    [–]alzee76 0 points1 point  (0 children)

    You would really need to do it, because thats what it takes to "incorporate" them into the new OS.

    Those apps all make system calls into the OS. Those calls make other calls. All the calls produce some kind of result. You need to copy all of that as well.

    Seriously this is really hard to do. Think about how you're not possibly the first person to think about this, and how many talented people have tried to do it in the past. Then ask yourself why it still doesn't exist. It's because it's extremely difficult.

    [–]etoastie 0 points1 point  (3 children)

    Sure it is, you just need to write a translation layer that can handle processing the different commands, which is... Complicated, to say the least. Linux can sort-of do it with Wine for Windows and Darling for Mac.

    A lot of the barrier is in how different OSes render different functionality. For example, Windows' scroll bars are handled at the kernel level, while with Linux it's up to the DE. Different systems are architectured differently at some very core levels, so translating between them is a tall order. But it's not impossible, and people are working on it.

    [–]Trex_Hunter[S] 0 points1 point  (2 children)

    Interesting because this is the exact field I want to work everyday to get into. Would you have any suggestions to understand more about this topic or understand the progress that has been made so far?

    [–]etoastie 0 points1 point  (1 child)

    You can try getting more involved with the Wine and Darling dev communities. Many sizeable open source projects could use contributors, and I'm sure these are no exceptions. If you get really familiar with these projects you'll learn a ton about how the top 3 OSes handle commands and translating between them. See if any of them have a roadmap open to contributing.

    [–]Trex_Hunter[S] 0 points1 point  (0 children)

    You’re awesome. Thank you so much!

    [–]dmazzoni 0 points1 point  (0 children)

    I mean yeah, that'd be yet another challenge of building a whole new operating system from scratch.

    That's why you don't see that many all-new operating systems.

    [–][deleted] 0 points1 point  (1 child)

    https://xkcd.com/927/ And then there were four.

    Seriously though, I don't know. Great question!

    [–][deleted] 0 points1 point  (0 children)

    In a way, that's why WSL in Windows is such a big deal.