base-kernel-device files

来源:互联网 发布:mac版word的选项在哪 编辑:程序博客网 时间:2024/05/16 17:39
device[ special] file:

an interface for a device driver that appears in a file system as if it were anodinary file


2 kinds:

character speclial file

      character at one time   getchar

      most unbuffered

      read|write immediately

      keyboard

block special file

      blocks ,fread

      hard disks,CD-ROM,other addressable regions of memory



Pseudo device

/dev/null       Accept and discard all input; produce no output

/dev/zero       Produce a continuous stream of NUL(zero value) bytes

/dev/random       Produce a variable-length stream of pseudo-random or truly random number .(blocking)

/dev/urandom     Procuce a variable-length stream of pseudo-random number.( non-blocking)

/dev/full      read:NUL; write:"disk full" message