Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Why has no one made an OS that can use Windows, Linux and MacOS files  (Read 456 times)

scourge728

  • Bay Watcher
    • View Profile

I don't know much about OSes, but it seems like it would be a good idea to do, and I'm curious why, as far as I can tell, no one has done such a thing. I tried googling it, but as it turns out 10 pages of google searches that are nearly the same things is my limit.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile

Depends on what you mean.  If you mean an OS that can run programs from all three OSes natively, then the short answer is that it's fantastic amount of work with little value, especially these days when it's pretty easy to run a virtual machine with each OS on it to run whatever programs you need.

The reason it's so much work is that internally, the OSes are extremely different (caveat that Mac OS and Linux are much more similar internally these days than they were decades ago, but this is a subject that people can debate until they're blue in the face).  Making them compatible would mean implementing all of the internal services that each provides, complete with quirks and bugs that developers accidentally rely on.

As an example of a very high level concept that might make this tricky, Windows labels its drives with letters (I don't think this is strictly necessary these days, but it's overwhelmingly common), but Linux does not.  On Windows, C: is the drive Windows is installed on and where things go by default.  The closest equivalent Linux has is the file system root, /.  If a Windows computer has two hard disks, the second one is probably D:.  On Linux, it could be called /storage/secondary, or lots of other things.

To make programs work on both, they'd somehow have to understand and expect that.  Now, there are ways around it, and the OS can provide abstraction so most programs would probably be able to work, but it only gets much more complicated from there.  Once you get to the level of invoking system services in the program, there is very little commonality between Windows and Linux.  If your program has to display a window for example, doing that through the Win32 API requires dozens of specific functions to be implemented in your OS that behave in very specific ways, which may also vary slightly on the version of Windows.  Linux doesn't even require a graphical environment, and if it has one installed, it behaves nothing like Windows' environment.  Your OS would have to implement the necessary OS functionality for both, and translate between the two somehow if multiple programs from different OSes needed to interact.

And you'd have to keep up with updates from either OS.  And Microsoft might sue you for trying to copy Windows, which I'm pretty sure they did with some projects that tried to replicate Windows' functionality, although I'm not sure they won that lawsuit.

In short, it's a mess.

If, instead, you were asking about whether it's possible to make an OS that can read ordinary documents made on all OSes, like text documents and pictures, that's much simpler and generally just works these days.  That wasn't always the case, especially between old MacOS and Windows.
Logged
Through pain, I find wisdom.

Trekkin

  • Bay Watcher
    • View Profile

Also because, were someone to do it, someone would ask in a year or two why there isn't an OS that can work with Windows, Linux, MacOS and HypotheticalMagicOS software -- or, more specifically, whatever combination of the four they happen to want.
Logged

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev

There have been interesting 'experiments' in allowing programs from one OS to run on another, mostly running Windows apps on Linux machines.

Wine, for example, has had some remarkable success in allowing Linux to run Windows programs by implementing/mapping the Windows operations to Linux ones (so not emulating Windows as a whole). But it's not perfect, and many programs will either misbehave or just plain not run.
Logged