devfs

Devfs ( Abbreviation for Device File System, translates device file system ) is a special file system for many Unix -like operating systems. Since the implementation of devfs in the Linux kernel has some shortcomings and no longer actively developed, udev was developed. Since the end of June 2006, devfs no longer part of the Linux kernel and was completely replaced by udev.

Linux devfs history

In the Linux kernel tree 2.2 the devfs has been introduced. The underlying idea was that the kernel modules themselves information about the name of the device files that they create, perform in addition to the minor and major numbers and the type with it. This was the first time take over the production of the device files the kernel itself.

The device files needed by the kernel and its modules or made ​​has then automatically creates the kernel in the devfs file system using the devfsd daemon. The file system was case usually mounted in the / dev directory.

The devfsd daemon ( Device File System Daemon) was in the file / etc / devfsd.conf configurable. So you could enter the required permissions or ownership for each device or device group among others.

Operation

General be treated on Unix systems many I / O devices such as hard drives, printers, virtual terminals and the like as special files. Whenever an operation on the device are made, this operation is made ​​to the file - the underlying file system of the device files then converts the operation on the file in an operation on the device over.

Devfs manages thereby the creation and deletion of such files if, for example, new devices, such as USB sticks, attached and removed. Likewise devfs is also responsible for user permissions of files and thus also for the rights that have individual user accessing the device.

Benefits

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

  • Devfs only shows the entries of the devices that were actually at some point connected to the computer
  • Devfs provides a program which can query other programs to find out whether new devices are connected

Disadvantages under Linux

Despite the benefits of devfs compared to the classical model, it also has a number of disadvantages. These include:

  • The device naming is not consistent in Linux if they are connected in a different order. On Solaris, this problem is due to the file / etc / not path_to_inst.
  • The designation does not match the Linux Standard Base standards
  • The naming of the device is handled in the kernel memory - especially with a large number of devices, this restricts other programs that also require the kernel memory, massively
  • By generating the device directory entries when loading the driver causes an excessively close relationship between device name and driver. It is usually advantageous when a device is "visible", even before a possibly specialized driver is loaded for it. Thus, the actual loading a driver and initialization of the associated hardware could be moved to the point where the device is actually needed, bringing the total time of initialization of the operating system could be reduced. Unfortunately Devfs behaves exactly reversed, and therefore requires the loading and initializing components may not even be needed.

These problems were encountered with the Linux operating system with the replacement of devfs by the software package udev.

233795
de