- 论坛徽章:
- 0
|
The distinction is that with a block device you can seek around and\r\naccess any block. It\'s random access. Think of a hard disk or a\r\ncdrom.\r\n\r\nA character device doesn\'t offer random access. You access it as a\r\nstream of data. With a tape drive you do have a little more\r\nflexibility, as you *can* seek around the tape, but it\'s not\r\ntransparant - instead of using the seek() system calls, you have to\r\nsend the tape drive commands to do what you want it to do.\r\n\r\nThere are device drivers out there that can make a block device out of\r\na tape drive, but they\'re typically r e a l l y slow and are rarely\r\nused.\r\n\r\nOther character devices would be a virtual console, a serial port, a\r\nkeyboard/mouse, a printer, etc.\r\n\r\nThe `blocking factor\' that you\'re referring to is merely the number of\r\nbytes written or read at a time. It doesn\'t mean it\'s a block device.\r\n\r\n\r\n\r\n--->http://publibn.boulder.ibm.com/d ... es/aixfiles/rmt.htm\r\n\r\nMagnetic tapes are used primarily for backup, file archives, and other off-line storage. Tapes are accessed through the /dev/rmt0, ... , /dev/rmt255 special files. The r in the special file name indicates raw access through the character special file interface. A tape device does not lend itself well to the category of a block device. Thus, only character interface special files are provided |
|