Released in the late 1980s, POSIX (Portable Operating System Interface) is a family of standards created to make sure that applications developed on one UNIX flavor can run on other UNIXes. The POSIX standard describes how system calls must behave. One particular section of the standard defines the semantics (behavior) of a POSIX compatible file system. Today, many of the UNIX systems that existed back in the 80s and 90s have become irrelevant. On the other hand, Linux became ubiquitous; one of the reasons being the POSIX compatibility. Being POSIX compatible made it easier to move from a UNIX to LINUX.
For a file system to be compatible with POSIX, it must:
- Implement strong consistency. For example, if a write happened before a read, the read must return the data written.
- Have atomic writes, where a read either returns all data written by a concurrent write or none of the data but is not an incomplete write.
- Implement certain operations, like random reads, writes, truncate, or fsync.
- Control access to files using permissions (see here) and implement calls like chmod, chown, and so on to modify them.
As you can see in the diagram above, your application makes system calls such as open, read, and write to communicate with the Linux kernel. The semantics, i.e., the behavior, of the system calls is defined by POSIX.
The Linux Kernel hands the file system-related system calls to the Virtual File System (VFS) layer, which abstracts from the underlying file system implementation, which includes local file systems but also distributed file systems like Quobyte.
Because of POSIX compatibility, you are no longer tied to a single file system. Suppose you decide to start using a specific file system, and all of a sudden, the creator of that file system gets incarcerated, and the file system becomes irrelevant (as random as this may sound, this actually happened with ReiserFS and its creator!). Even in a very random case like the one mentioned before, you don’t have to worry because you can easily swap out the file system without worrying about your application having problems with the new file system.
POSIX and Linux differences
Linux is seen as “partially POSIX compatible” when it comes to the file system, mainly because it doesn’t provide the isolation feature that POSIX requires for IO operations. Instead, reads and writes are atomic on a page level (4kB), but a read might return some pages of a concurrent write operation. The decision not to implement atomicity is mainly due to performance. Instead, applications have to use file locking if they expect concurrent read/write access and require isolation between them, e.g., to avoid reading incomplete writes.
File vs. Object - What's the difference?
What is the Network File System (NFS)?
What is a Parallel File System?
Quobyte - a POSIX compatible scale-out file system
Talk to Us
We are here to answer all of your questions about how Quobyte can benefit your organization.
Are you ready to chat? Want a live demo?