POSIX是什么?我读过维基百科上的文章,每次遇到这个词我都会去读。事实上,我从来没有真正理解它是什么。

有没有人可以通过解释“POSIX的需求”来解释给我听?


当前回答

Posix governs interoperability, portability, and in other areas such as the usage and mechanism of fork, permissions and filesystem standards such as /etc, /var, /usr and so on . Hence, when developers write a program under a Posix compliant system such as for example Linux, it is generally, not always, guaranteed to run on another posix compliant system such as IBM's AIX system or other commercial variants of Unix. Posix is a good thing to have as such it eases the software development for maximum portability which it strives for. Hope this answer makes sense.

感谢Jed Smith和Tinkertim指出我的错误——我的错!!:(

其他回答

另一方面,POSIX代表“可移植操作系统接口”,POSIX是一组定义操作系统和应用软件之间接口的标准。POSIX类似于UNIX标准,它旨在确保为一个POSIX兼容的操作系统编写的软件可以在其他POSIX兼容的操作系统上运行而无需修改。

POSIX标准定义了一组在基于unix的操作系统中常见的系统调用、库和实用程序。

许多操作系统,包括Linux、BSD和macOS,都是POSIX兼容的,这意味着它们满足POSIX标准中定义的要求。

Posix governs interoperability, portability, and in other areas such as the usage and mechanism of fork, permissions and filesystem standards such as /etc, /var, /usr and so on . Hence, when developers write a program under a Posix compliant system such as for example Linux, it is generally, not always, guaranteed to run on another posix compliant system such as IBM's AIX system or other commercial variants of Unix. Posix is a good thing to have as such it eases the software development for maximum portability which it strives for. Hope this answer makes sense.

感谢Jed Smith和Tinkertim指出我的错误——我的错!!:(

关于POSIX的一些事实并不那么明朗。

POSIX也是系统调用接口或API,它有将近30年的历史。

它被设计用于对本地存储的串行数据访问,使用具有单个cpu的单台计算机。

在POSIX的设计中,安全性并不是一个主要的问题,这导致了多年来大量的竞争条件攻击,迫使程序员绕过这些限制。

严重的错误仍在被发现,这些错误本可以通过更安全的POSIX API设计来避免。

POSIX期望用户一次发出一个同步调用,并在发出下一个调用之前等待它的结果。今天的程序员希望一次发出许多异步请求,以提高总体吞吐量。

这种同步API对于访问远程和云对象尤其不利,因为在这些地方,高延迟很重要。

Posix更像是一个操作系统,它是一个“操作系统标准”。你可以把它想象成一个虚构的操作系统,它实际上并不存在,但它有一个文档。这些论文是由IEEE定义的“posix标准”,IEEE是美国的大型标准组织。 实现该规范的操作系统是“posix兼容的”。

政府法规在投资中更倾向于posix兼容的解决方案,因此posix兼容具有显著的财务优势,特别是对于美国的大型IT公司。

一个完全兼容posix的操作系统的回报是,它可以保证无缝地编译和运行所有兼容posix的应用程序。

Linux是最著名的。OSX、Solaris、NetBSD和Windows NT也可以在这里使用。Free和OpenBSD只是“几乎”兼容posix。WinNT的posix-compliance只是避免上述政府监管的伪解决方案。

POSIX是IEEE指定的一系列标准,用于阐明和统一Unix-y操作系统提供的应用程序编程接口(以及辅助问题,如命令行shell实用程序)。

当您编写依赖POSIX标准的程序时,您可以相当肯定地将它们轻松地移植到大量的Unix衍生产品中(包括Linux,但不限于它!);如果你使用的某些Linux API不是Posix的一部分,那么将来你想要将该程序或库移植到其他unix系统(例如MacOSX)时,你将会遇到困难。