POSIX是什么?我读过维基百科上的文章,每次遇到这个词我都会去读。事实上,我从来没有真正理解它是什么。
有没有人可以通过解释“POSIX的需求”来解释给我听?
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代表可移植操作系统接口(Portable Operating System Interface),是IEEE为促进应用程序可移植性而设计的标准。POSIX是一个厂商联盟试图创建UNIX的单一标准版本。
POSIX是IEEE指定的一系列标准,用于阐明和统一Unix-y操作系统提供的应用程序编程接口(以及辅助问题,如命令行shell实用程序)。
当您编写依赖POSIX标准的程序时,您可以相当肯定地将它们轻松地移植到大量的Unix衍生产品中(包括Linux,但不限于它!);如果你使用的某些Linux API不是Posix的一部分,那么将来你想要将该程序或库移植到其他unix系统(例如MacOSX)时,你将会遇到困难。
关于POSIX的一些事实并不那么明朗。
POSIX也是系统调用接口或API,它有将近30年的历史。
它被设计用于对本地存储的串行数据访问,使用具有单个cpu的单台计算机。
在POSIX的设计中,安全性并不是一个主要的问题,这导致了多年来大量的竞争条件攻击,迫使程序员绕过这些限制。
严重的错误仍在被发现,这些错误本可以通过更安全的POSIX API设计来避免。
POSIX期望用户一次发出一个同步调用,并在发出下一个调用之前等待它的结果。今天的程序员希望一次发出许多异步请求,以提高总体吞吐量。
这种同步API对于访问远程和云对象尤其不利,因为在这些地方,高延迟很重要。
关于如何使操作系统与晚期UNIX操作系统兼容的规范(蓝图)(愿上帝保佑他!)这就是为什么macOS和GNU/Linux有非常相似的终端命令行、GUI、库等。因为它们都是根据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指出我的错误——我的错!!:(