Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    linux device file

    Hi, everyone:

    I am new to Linux, and currently reading "understanding the Linux Kernel, 3rd Edition By Daniel P. Bovet, Marco Cesati".

    In chapter 13.3, it says that:

    I/O devices are treated as special files called device files. According to the characteristics of the underlying device drivers, device files can be of two types: block or character.

    My question is that, PC has many IO devices such as "DMA controller, timer, etc",
    Then obviously these devices canít be classified as either block or character.

    Then how does Linux deal with these devices? And what is the point to just classify the devices to "block or character", since there are so many exceptions?


  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Harrow, UK
    In Linux the word "device" has a particular meaning. A device is something that the kernel can read from or write to. The kernel spends much of its time shifting data about, for example from a terminal keyboard to memory to disk, and back from the disk to memory to a terminal screen. This can be transferred character by character (as with a port) or in blocks (as with a disk).

    So a terminal, a sound card or a usb port is a Linux device but a controller is just a piece of hardware. It needs a driver (which will be inside the kernel, probably as a loadable module) but it doesn't have any data transferred to or from it, either in blocks or in characters.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts