devfs

from Wikipedia, the free encyclopedia

devfs ( Engl. abbr. Dev ice F ile s ystem , translates device file system ) is a special file system for many Unix-like operating systems . It is used to manage the device files . Since the implementation of devfs in the Linux kernel has some shortcomings and is no longer actively developed, udev was developed. Since the end of June 2006, devfs is no longer part of the Linux kernel and has been completely replaced by udev.

Working method

In general, many I / O devices such as hard disks , printers , virtual terminals and the like are treated as special files ( device files ) on Unix systems . If an operation is now to be carried out on the device, this operation is carried out on the device file - the underlying file system of the device files then converts the respective operation on the file into a corresponding operation on the device.

One of the tasks of devfs is to create and delete such files, for example when new devices (such as USB sticks ) are attached and removed again. Devfs is also responsible for the user rights of the device files, including the rights that individual users have when accessing the devices.

advantages

Compared to the static / dev system, devfs has a number of advantages:

  • devfs only shows entries for devices that were actually connected to the computer at some point.
  • devfs provides a mechanism with which other programs can find out whether new devices have been connected.

Disadvantages under Linux

Despite the advantages of devfs over the classic model, it also has a number of disadvantages. These are among others:

  • the naming of the devices is inconsistent in Linux if they are connected in different order. This problem /etc/path_to_instdoes not exist on Solaris thanks to the file .
  • the naming does not correspond to the norms of the Linux Standard Base .
  • The naming of the devices is handled in the kernel memory - especially with a large number of devices, this massively restricts other programs that also need the kernel memory.
  • The creation of the device directory entries when the driver is loaded results in too close a dependency between device name and driver. It is usually advantageous if a device is "visible" before a possibly specialized driver is loaded for it. As a result, the actual loading of a driver and the initialization of the associated hardware could be postponed to the point in time when the device is actually needed, which could reduce the overall initialization time of the operating system. Devfs does exactly the opposite, and therefore requires loading and initializing components that may not be needed.

These problems were countered with the Linux operating system by replacing devfs with the software package udev .

History of devfs on Linux

The devfs was introduced in the Linux kernel tree 2.2 . The underlying idea was that the kernel modules themselves carry information about the names of the device files that they create, along with the minor and major numbers and type. This enabled the kernel to generate the device files itself for the first time.

The required or provided by the kernel and its modules, device files has then automatically the kernel in the devfs file system using the devfsd - Daemons created. The file system was usually mounted in the / dev directory .

The devfsd - Daemon ( Device File System daemon ) was in the file /etc/devfsd.conf configurable. Among other things, you could enter the desired authorizations or ownership structures for each device or device group.

Web links