Saturday, 16 May 2020

Operating Systems Question Bank with Answers 17

What is a special file? Define block special file and character special file with examples. What is the essential difference between a block special file and a character file?


Question:
What is a special file? Define block special file and character special file with examples. What is the essential difference between a block special file and a character file?

Answer:
A special file is also called device file. It works as an interface between the device driver and system. They are Character devices, Block devices and Pseudo-devices.
A block special file (block device) that provides access to a device that transfers in groups of a fixed size. Block-driven is useful when you know how much data you can expect, which is often the case with files on disk. The name “block device” comes from the fact that the corresponding hardware typically reads and writes a whole block at a time (e.g. a sector on a hard disk). For example, a hard disk, memory.
A character special file (character device) that provides access to a device that transfers in increments of a single character. Character-driven is more practical when you don’t know when your data will stop thus you keep it running until no more characters get through. The name “character device” comes from the fact that each character is handled individually. For example, a terminal, keyboard, mouse.
Block special files consist of numbered blocks, each of which can be read or written independently of all the other ones. It is possible to seek to any block and start reading or writing. This is not possible with character special files.

******************
Related Questions:


  • What is a special file? Define block special file and character special file with examples. What is the essential difference between a block special file and a character file?


No comments:

Post a comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents