Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why POSIX is called "Portable Operating System Interface"?

I have searched hard but still confused why POSIX is called "Portable Operating System Interface", what I learned is that it is some threading library for Unix environment, because when you need to use it under windows you have to use cygwin or "Windows Services of Unix", etc. That's why I am confused why it is called Portable OSIX. I am a professional C/C++ programmer in Windows domain but new in Unix/Linux. Thanks for your answers in advance.

like image 783
Ahsan Raza Avatar asked Jan 22 '10 06:01

Ahsan Raza


3 Answers

Before Posix, the Unix family tree was becoming very diverse and incompatible. A program written for one Unix was not compatible with a different Unix without significant porting effort.

Posix was one of the attempts to present a common set of utilities and programming interfaces so that your software would be portable to multiple versions of Unix.

Since Posix is about the interface and not the actual OS, it is possible to have a Posix facade on a non Unix OS (such as the Microsoft Windows Services for Unix presenting a Posix facade on top of Windows).

like image 78
R Samuel Klatchko Avatar answered Oct 20 '22 02:10

R Samuel Klatchko


That one or two stragglers have decided to not make it part of their core doesn't not make it any less portable to almost every other important operating system.

like image 9
Ignacio Vazquez-Abrams Avatar answered Oct 20 '22 02:10

Ignacio Vazquez-Abrams


POSIX is simply an interface for operating systems that defines concepts like threads, processes, signals, pipes and I/O. This is not the only interface that's portable across multiple interfaces, but is simply one standard. The name was actually defined by Richard Stallman in the 1980s.

The reason for defining POSIX was that many different versions of UNIX were incompatible, because operating systems hadn't agreed on the implementation of threading or processes.

Here are some more links for further research:

  • The History of Posix: A Study in the Standards Process
  • POSIX (Wikipedia)
like image 4
James Thompson Avatar answered Oct 20 '22 03:10

James Thompson