Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question for Programmers and the Like
#13
It's not merely the names of the functions that are different. The system interfaces were designed differently. Linux implements POSIX which means that programs designed for Linux are usually source-code compatible with the various flavors of Unix. POSIX is a fairly minimal interface but the Windows API has hundreds or thousands of functions. In Windows, the GUI is a part of the OS, while in Linux, the GUI (if present) is managed by a non-OS program.

There are many other differences in design. For example, in Linux and other Unix-like operating systems, a program that starts another program passes the command-line arguments as a list of strings. In Windows, the first program just passes one big string. If the second program wants to break it up, it can call CommandLineToArgvW (or if the program uses main as the entry point instead of WinMain, Windows will do that for you).

Linux binaries are not even compatible with binaries for other Unix-like operating systems like NetBSD. I'll be honest, I'm not entirely certain why that is. I suspect it has something to do with the operating systems having different ways of invoking a given system call.

Making an OS that is binary compatiblity with Windows is difficult, but ReactOS is trying. Linus Torvald's goal was not to be compatible with Windows; it was to create a free operating system. Linux could indeed run "existing software" designed for Unix-like operating systems after recompiling them. Bash and gcc were two of the first programs he got working on Linux.

Also remember that Linux started in 1991. Windows was still young (version 3.0) and not even an actual operating system yet - it was still just a graphical shell on top of MS-DOS.

.NET isn't exactly exclusive to Windows. Mono is a free implementation that can run on Linux.

I checked and apparently there is a kernel module for Linux that allows PE executables to be loaded.

A lot of the stuff in this thread is the kind of stuff that might be covered in a systems programming (sophomore-level) or operating systems (junior-level) course in college.
Reply


Messages In This Thread
Question for Programmers and the Like - by Khoi - 2010-10-29, 01:51 PM
Question for Programmers and the Like - by larmie - 2010-10-29, 02:06 PM
Question for Programmers and the Like - by Spaz - 2010-10-29, 03:34 PM
Question for Programmers and the Like - by Hazzy - 2010-10-29, 03:49 PM
Question for Programmers and the Like - by Fiel - 2010-10-29, 04:02 PM
Question for Programmers and the Like - by Spaz - 2010-10-29, 04:45 PM
Question for Programmers and the Like - by Nikkey - 2010-10-29, 05:23 PM
Question for Programmers and the Like - by Hazzy - 2010-10-29, 07:44 PM
Question for Programmers and the Like - by Eos - 2010-10-29, 09:56 PM
Question for Programmers and the Like - by Spaz - 2010-10-29, 10:28 PM
Question for Programmers and the Like - by Eos - 2010-10-29, 10:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)