Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Software and os

  1. Sep 28, 2004 #1
    how can a software be changed be used in different os ? one software but can use in 3 os, win, mac, linux ???? how can that be ?what do the maker change in the software to fit all three at the same time ??? thank you.
     
  2. jcsd
  3. Sep 28, 2004 #2

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    All operating systems provide basically the same services -- memory allocation, interprocess communication, file I/O, etc. The difference is that they all use different conventions for how those services are made available to programs. Programs send requests to the operating system (generally) by making procedure calls; the parameters and types passed in those procedure calls are different on different operating systems.

    The most common way to provide portability is to create an abstraction above the operating system services, and then write your application on top of that abstraction. For example, all C and C++ implementations provide the standard library, with functions like printf and fopen. These functions are generally mapped into OS-specific procedures. This way, the same piece of source code (which uses printf) can be recompiled on any operating system that provides a printf procedure.

    This is the concept behind POSIX (the Portable Operating System Interface). POSIX is a collection of standardized, generic operating system procedure calls. Any program which is written to the POSIX interface can be compiled and run on any operating system that provides the POSIX interface.

    Graphical interface get a little fuzzier -- it's difficult to cleanly abstract the operations in a GUI, because different GUIs provide so many different kinds of elements and behaviors. A few solid projects which attempt to provide a cross-platform graphical interface are called GTK and Qt. A program which is written to the GTK or Qt interface can be run on Windows and Linux, for example, and look nearly exactly the same on both.

    - Warren
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Software and os
  1. OS help (Replies: 6)

  2. OS question (Replies: 4)

  3. Vista OS (Replies: 21)

Loading...