Special files, also known as device files, are used with device drivers to control specific devices or parts of a computer system. They have a special name and can issue commands via I/O system calls. Microsoft® uses simple keywords like CON and PRN to identify their device files. There are different types of special files including block, character, and pseudo devices.
A special file, also known as a device file, is a file on a computer used with device drivers. It can look and act like a regular file, but includes a special name that distinguishes it from other files. This name cannot be used with other file types. The special file can issue commands to a device driver via Input/Output (I/O) system calls. This makes it easier for the file to control a specific device or part of the computer system.
A device node stores information about the special file and uses a major and minor number to identify the file and the driver it works with. Microsoft® uses special files in its operating systems, such as MS-DOS® and Windows®. An important difference is the name and how the special file is distinguished. Microsoft® refers to special files as device files, and earlier operating systems use fallback words to identify these special files instead of major and minor numbers.
Microsoft® device files have simple keywords like CON and PRN. They may or may not have both an input command and an output command. For example, CON can both receive typed data and print computer data to the console. The PRN keyword, however, can only print text. It cannot receive any input.
To better understand how special files affect people in their daily lives, consider a college student who saved her term paper on a CD-ROM to take to the campus library and print. Once the CD is inserted into the computer, the computer must read the data on the CD and open it on the computer so that the student can send it to the printer. A special type of file, known as a block device, transfers data in blocks from the CD to your computer. Once all blocks have been transferred, the computer can display the contents of the CD on the computer screen.
In addition to block devices, there are also character devices and pseudo devices. Character devices work with systems that send information one character at a time rather than in large chunks as block devices handle. Pseudo-devices are used to interact with commands that the operating system can execute that do not require a physical object to interact with. CD-ROM is a physical object managed by a block device. A pseudo-device only deals with commands and does not interact with any physical object.
Protect your devices with Threat Protection by NordVPN