devfs

From Wikipedia, the free encyclopedia


devfs is a specific implementation of a device file system on Unix-like operating systems, used for presenting device files, an abstraction for accessing I/O and other peripherals. The underlying mechanism of implementation may vary, depending on the OS.

Contents

[edit] Rationale

Maintaining these special files on a general-purpose file system is inconvenient, and as it needs kernel assistance anyway, the idea of a special-purpose file system that is not stored on disk arose.

Also defining when devices are ready to appear is not entirely trivial. The 'devfs' approach is for the device driver to request synchronously creation and deletion of 'devfs' entries related to the devices it enables and disables, and this makes it much simpler and with easier to understand semantics than systems like udev that have complicated asynchronous notifications.

Another advantage is that unlike udev it does not require any user-space daemon, thus making for a simpler and quicker boot, it does support one to allow user-space actions on device file creation and deletion.

[edit] Implementations

Operating System Device file system Standard mount-point Author Notes
2.4 <= Linux < 2.6.18 devfs /dev Richard Gooch Implemented fully in the kernel. OBSOLETED: Users are encouraged to migrate to udev.
2.6.15 <= Linux udev /dev Greg Kroah-Hartman, Kay Sievers and Dan Stekloff Implemented largely in user space, device information is gathered from sysfs. Device files can be stored on a conventional general-purpose file system, or in a memory file system (tmpfs).
Solaris devfs /devices Sun Microsystems
2.0 <= FreeBSD devfs /dev  ? Implemented fully in the kernel.
Mac OS X devfs /dev  ? Implemented fully in the kernel.
Plan 9 #  ? Implemented in kernel. Can not be mounted elsewhere or unmounted.
Operating System Device file system Standard mount-point Author Notes

[edit] Appendix

[edit] Further reading

[edit] External links

[edit] See also

[edit] References