compatibility
July 25, 2007 9:20 AM   Subscribe

Computer Compatibility: How do companies go about making their software or hardware compatible?

Do makers of operating systems create their design based on some instruction set? Like was Windows XP designed on x86. And in Software Engineering do companies get different SDK's from microsoft and Apple, study them and then begin programming. Where do API's fit into all this? Also, I could also use a good book to read on this subject.
posted by amsterdam63 to Computers & Internet (10 answers total)
 
Your question does cut a broad swath. The IEEE is one body that comes up with various standards that manufacturers adopt.
posted by Burhanistan at 9:37 AM on July 25, 2007


Specifications, usually written, drive big designs in big formal companies. There are formal documents for hardware specs, and most likely, for an OS. Who creates/maintains those specs depends on what it is you are talking about.

For instance, IEEE has a bunch of specs/standards for wireless, with names like 802.11. If you want your stuff to work with 802.11, it has to conform to that spec/standard. Lots of companies with proprietary stuff have internal specs for their goods, (hardware, software, systems), and the various internal entities use them as road maps to implement conforming components.

It works the same way for OS's and complicated software. Sometimes, there are functional specifications, implementation specifications, and other requirements documents that outline how everything goes together. On something huge like Windows, it constantly changes, though not randomly.

The relationship to a particular instruction set of a particular processor and an OS is kind of tenuous, IMO. Windows co-evolved with Intel hardware, so it's true that it runs on said hardware, but it could also be ported to other processors.

Your brief question contains several books worth of answers. Sorry to be brief, but you'll no doubt get a sack full of responses. Good luck.
posted by FauxScot at 9:42 AM on July 25, 2007


At the bottom, it's electrons. Chip manufacturers use transistors to move those electrons around.

Those transistors are switches, and the way those switches are set is controlled by electrical charges stored in other chips.

Those patterns of electrical charges map to the instruction set that the chip will respond to. The chip manufacturer publishes the instruction set. Anyone who wishes to make a program run on that chip needs to follow that instruction set.

Compilers take a high level language and transform it into the values that correspond to these instructions. This can be a language like assembly language, C, or C++. One of the reasons for the early success of Unix was that it was written in C, and it was relatively easy to write compilers that worked on the various chips of the day.

Operating systems are usually written in a higher-level language like C, and they will expose an API to the programs that wish to run on this particular OS. The operating system provides abstract access to the actual physical resources of the machine. If you wish your program to be compatible with a particular operating system, you usually need a set of libraries that are provided by the operating system or compiler vendor (MS, Apple, GNU) that provide access to the OS API.

Many applications in turn act as interpreters or virtual machines (Java, C#, perl, python), providing an imaginary computer with a common API that works across many operating systems. This allows these languages to run on Linux, Solaris, Windows, MacOSX, whatever.

Compatibility is a fairly complex subject; there's several different layers in your computer. If you are just getting started, I'd chose an area I was interested in and read the relevant articles on wikipedia- their nerd coverage is usually pretty good.
posted by jenkinsEar at 9:51 AM on July 25, 2007 [2 favorites]


Generally speaking, companies write software using tools and application programming interfaces that manage "high-level" code, so that they do not need to worry about the low-level details of hardware. This is called "abstraction", letting the development tools worry about the low-level details.

Long ago, Windows NT (what was XP and 2000) was written for multiple platforms, like x86 and PPC. At that time, Microsoft did a lot of heavy lifting for software developers — the idea being you would just recompile your code (written with Microsoft's API kit), and you would have a product that would run on any hardware platform that NT would run under. At this time, Windows only runs under x86 or x86-compatible systems.

Software companies decide on what platforms they want to target their software, based on their audience (market). You don't want to spend a lot of money on a product that won't make money for you. So you get a lot of Microsoft developers out of sheer market forces.

There are different APIs for different needs. Some are general, some are specific in purpose.

For example, Apple makes an API called Core Audio, which lets software engineers write applications and plug-ins to manage digital audio and control signalling, using a language called Objective C.

Another example of an API is Windows API, which lets you write Windows applications in C++.
posted by Blazecock Pileon at 9:53 AM on July 25, 2007


The cliff notes answer is this:

1. Windows runs on a certain hardware. It is coded in the machine language for that hardware. They can use intel's compilers (the maker of the chip) or roll their own using intel's reference, if they are using x86 chips.

2. Windows is an OS and contains its own APIs. Again, developers can roll their own using MS's documentation or use software MS developed like Visual Studio to make software.

3. You can run device drivers in windows. Again the hardware manufacturer would release a reference. If they dont then no one would be able to compile anything to work with it.

4. There's no standards body that contains all these things. For instance, MS is a private corporation and if they wanted to change their directx API they dont really need to standardize it with anyone. Just let the developers know as a reference or update their homebrew tools to make use of these changes.

Generally organizations like IEEE, ISO, W3C etc maintain standards.
posted by damn dirty ape at 9:58 AM on July 25, 2007


Basically, whoever provides the "service" gets to standardize the interface that they offer. Intel built the x86, it defined the instruction set and everybody copied (most of) it. Microsoft built windows, and they defined the API (sort of). Sometimes many groups of providers get together and define a 'standard' interface (c.f. IEEE, POSIX), and occasionally an industry adopts a de-facto standard just because everybody's already used to it (XMLHttpRequest/AJAX).
posted by Skorgu at 10:26 AM on July 25, 2007


There are lots of libraries that support cross-platform coding between Win32, *nix, and OS-X. Qt, GTK+, and WxWindows are some for GUI applications. ACE is a framework for network programs. Apache Portability Runtime makes Apache and apache-related apps run on different operating systems. Mozilla has a layer that does the same.

Using Java, which compiles to bytecode rather than to opcode (bytecode is executed by an interpreter, opcode is executed on the CPU directly), you can increase portability (though its not foolproof).

Any language that's interpreted will generally run the same on different platforms, which is one of its major draws.
posted by devilsbrigade at 10:41 AM on July 25, 2007


It should also be said that usually those writing to an API or SDK or set of services are given a reasonable expectation that their software will continue to run on future versions. That is, that a newer version of the SDK will also be backward compatible.

This is why a lot of software will say "Requires version X.Y or newer" as their system requirements. This is not something that happens automatically but must be coded into the SDK (e.g. supporting older system calls even when providing better new alternatives)
posted by vacapinta at 10:47 AM on July 25, 2007


The politics of compatibility are also interesting.

A company could build a USB hub that's so badly designed that it does not work well with some existing USB devices. You plug your camera in your new hub, and a bug in the hub prevents your camera from appearing on your desktop. When that happen, most people blame Windows. Since incompatible USB hubs and other such devices are detrimental to Microsoft's reputation, Microsoft invented the "Windows Logo". Hardware manufacturers need to send their new hardware to Microsoft and pass number of quality tests. They are only allowed to use the trademarked logo "compatible with Microsoft Windows" if they pass.

There is something similar going on between DVD, dvd players, and the DVD logo. There is also the same thing going on with wifi cards and the wifi logo. Same thing with Java, the Java logo and Java enabled cellphone. etc.
posted by gmarceau at 11:40 AM on July 25, 2007


For example, Apple makes an API called Core Audio, which lets software engineers write applications and plug-ins to manage digital audio and control signalling, using a language called Objective C.

AFAIK, the various parts that constitute Core Audio are C, not Objective-C.
posted by Mikey-San at 3:10 PM on July 25, 2007


« Older What's to do in NY?   |   What can I do to calm down an angry and scared cat... Newer »
This thread is closed to new comments.