Friday, May 7, 2010

4.6. The Relationship between an Application program, the operating system and hardware

The relationship between an application program and the underlying hardware is usually shown in the form of a stack of layers as shown below:

Application
Application Programming Interface (API)
Operating System
Device Driver
Hardware

Most applications need to know how to talk to the operating system - which is why the operating system will provide a set of programming libraries knows as APIs or SDKs (Software Development Kits) for programmers to use when writing applications.

The APIs sit between the operating system and the running application. The running application relies on the API to perform essential tasks on the computer by telling the operating system what it wants to do - which is why a program that is written to use Windows Vista APIs will not run on an Apple Mac without some kind of emulation or help.

Because there are so many different pieces of hardware, it would be impossible for an operating system to support them all (especially the lesser known devices). That's why hardware manufacturers will write device drivers for different operating systems, so the operating system knows how to talk to the hardware.

No comments:

Post a Comment