HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includi ...
, a synthetic file system or a pseudo file system is a hierarchical interface to non-file objects that appear as if they were regular files in the tree of a disk-based or long-term-storage file system. These non-file objects may be accessed with the same
system call In computing, a system call (commonly abbreviated to syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, acc ...
s or
utility program Utility software is software designed to help analyze, configure, optimize or maintain a computer. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that benefit ord ...
s as regular files and
directories Directory may refer to: * Directory (computing), or folder, a file system structure in which to store computer files * Directory (OpenVMS command) * Directory service, a software application for organizing information about a computer network's ...
. The common term for both regular files and the non-file objects is ''node''. The benefit of synthetic file systems is that well-known file system semantics can be reused for a universal and easily implementable approach to
interprocess communication In computer science, inter-process communication or interprocess communication (IPC) refers specifically to the mechanisms an operating system provides to allow the processes to manage shared data. Typically, applications can use IPC, categoriz ...
. Clients can use such a file system to perform simple file operations on its nodes and do not have to implement complex message encoding and passing methods and other aspects of protocol engineering. For most operations, common file utilities can be used, so even scripting is quite easy. This is commonly known as
everything is a file Everything is a file is an idea that Unix, and its derivatives handle input/output to and from resources such as documents, hard-drives, modems, keyboards, printers and even some inter-process and network communications as simple streams of bytes ...
and is generally regarded to have originated from
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
.


Examples


/proc filesystem

In the Unix-world, there is commonly a special filesystem mounted at
/proc The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized meth ...
. This filesystem is implemented within the
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
and publishes information about
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management *Business process, activities that produce a specific se ...
es. For each process, there is a directory (named by the
process ID In computing, the process identifier (a.k.a. process ID or PID) is a number used by most operating system kernels—such as those of Unix, macOS and Windows—to uniquely identify an active process. This number may be used as a parameter in various ...
), containing detailed information about the process:
status Status (Latin plural: ''statūs''), is a state, condition, or situation, and may refer to: * Status (law) ** City status ** Legal status, in law ** Political status, in international law ** Small entity status, in patent law ** Status confere ...
, open files, memory maps, mounts, etc. /proc first appeared in Unix 8th Edition, and its functionality was greatly expanded in
Plan 9 from Bell Labs Plan 9 from Bell Labs is a distributed operating system which originated from the Computing Science Research Center (CSRC) at Bell Labs in the mid-1980s and built on UNIX concepts first developed there in the late 1960s. Since 2000, Plan 9 has be ...
.


Linux /sys filesystem

The /sys filesystem on Linux complements /proc, by providing a lot of (non-process related) detailed information about the in-kernel status to userspace. More traditional Unix systems locate this information in sysctl calls.


ObexFS

ObexFS is a FUSE-based filesystem that provides access to
OBEX OBEX (abbreviation of OBject EXchange, also termed IrOBEX) is a communications protocol that facilitates the exchange of binary objects between devices. It is maintained by the Infrared Data Association but has also been adopted by the Bluetooth S ...
objects via a filesystem. Applications can work on remote objects via the OBEX protocol as if they were simply (local) files.


Plan 9 file servers

On the
Plan 9 from Bell Labs Plan 9 from Bell Labs is a distributed operating system which originated from the Computing Science Research Center (CSRC) at Bell Labs in the mid-1980s and built on UNIX concepts first developed there in the late 1960s. Since 2000, Plan 9 has be ...
operating system family, the concept of 9P synthetic filesystem is used as a generic IPC method. Contrary to most other operating systems, Plan 9's design is heavily distributed: while in other OS worlds, there are many (and often large) libraries and frameworks for common things, Plan 9 encapsulates them into fileservers. The most important benefit is that applications can be much simpler and that services run network and platform agnostic - they can reside on virtually any host and platform in the network, and virtually any kind of network, as long the fileserver can be mounted by the application. Plan 9 drives this concept expansively: most operating system services, e.g. hardware access and networking stack are presented as fileservers. This way it is trivial to use these resources remotely (e.g. one host directly accessing another host's block devices or network interfaces) without the need of additional protocols. Other implementations of the 9P file system protocol also exists for many other systems and environments.


Embedded systems

Debugging embedded systems or even system-on-chip (SoC) devices is widely known to be difficult. Several protocols have been implemented to provide direct access to in-chip devices, but they tend to be proprietary, complex and hard to handle. Based on 9P, Plan 9's network filesystem, studies suggest using synthetic filesystems as universal access scheme to that information. The major benefit is that 9P is very simple and so quite easy to implement in hardware and can be easily used and over virtually any kind of network (from a serial link up to the internet).


Pros and cons

The major argument for using synthetic filesystems might be the flexibility and easy access to
service-oriented architecture In software engineering, service-oriented architecture (SOA) is an architectural style that focuses on discrete services instead of a monolithic design. By consequence, it is also applied in the field of software design where services are provide ...
s. Once a noticeable number of applications use this scheme, the overall overhead (code, resource consumption, maintenance work) can be reduced significantly. Many general arguments for SOAs also apply here. Arguments against synthetic filesystems include the fact that filesystem semantics may not fit all application scenarios. For example, complex
remote procedure call In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure ( subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal ( ...
s with many parameters tend to be hard to map to filesystem schemes, and may require application redesign.


References


External links


The 9P synthetic-file-system protocol
* BROWN, Geoffrey
On-Chip Filesystems to support Complex Embedded Systems
* PISUPATI, Bhani N.
A virtual filesystem framework to support embedded software development
* Minnich, Ron
Why Plan9 is not dead And What we can learn from it
{{Operating system Special-purpose file systems