simple examples of how to

Friday, October 21, 2011

[Linux] The difference between block and character device

The one big difference is how you handle the device. When you perform open, close, read, write, seek, etc.
For block devices, it reads and writes in the unit of a block of bytes size.
For character devices, it reads and writes in the unit of a byte.
More important thing to remember is that block devices are able to random-access such as hard-disk, but character devices are in stream such as keyboard.

No comments:

Post a Comment