What does a POSIX interface refer to in terms of microkernels?

405 Views Asked by At

I read the following in an article: Either approach (referring to monolithic or micro kernel) can offer a POSIX interface, where the design of the kernel becomes of little interest to someone simply wanting to write code to run on any given design. What does the POSIX interface mean in this context?

2

There are 2 best solutions below

1
On

POSIX interface means user interface, described in POSIX standard.

Since it is user interface, it doesn't depend on particular kernel's implementation.

0
On

POSIX is a set of standard that defines an application programming interface (API), along with a few other things but lets just focus on the API. Basically it defines a set of user-space functions that should be available. If said functions are available on all POSIX systems the program can easily be ported from one POSIX system to another, hence the name Portable Operating System Interface.

Micro-kernel vs. a monolithic kernel describes how the system is designed. Micro-kernels are designed to be as simple as possible performing just the necessary work that the kernel has to do. This is typically thread, memory and interrupt management along with inter-process communication (IPC). IPC is an important one because the functionality that the micro-kernel doesn't implement but a typical monolith would are implemented as user-space services and accessed via IPC. For example, device drivers and file-systems would typically be implemented as user-space services. In the monolith kernel design these are implemented in kernel (although it is possible to have user-space device drivers or file-systems as well which Linux does).

So POSIX which defines the user-space functions but it doesn't say how those functions have to be implemented. So open in a monolith might cause the open system call to be triggered. In a micro-kernel open could actually just be a wrapper around the IPC system call which is going to contact the user-space service that is responsible for handling open (which could depend on what you are opening). All POSIX cares about is that there is an open and that it behaves correctly, it doesn't care about how open accomplishes its task.