Summary
In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a as if it were an ordinary . There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions. Device files usually provide simple interfaces to standard devices (such as printers and serial ports), but can also be used to access specific unique resources on those devices, such as disk partitions. Additionally, device files are useful for accessing system resources that have no connection with any actual device, such as data sinks and random number generators. There are two general kinds of device files in Unix-like operating systems, known as character special files and block special files. The difference between them lies in how much data is read and written by the operating system and hardware. These together can be called device special files in contrast to named pipes, which are not connected to a device but are not ordinary files either. MS-DOS borrowed the concept of special files from Unix but renamed them devices. Because early versions of MS-DOS did not support a hierarchy, devices were distinguished from regular files by making their names reserved words, for example: the infamous CON. These were chosen for a degree of compatibility with CP/M and are still present in modern Windows for backwards compatibility. In some Unix-like systems, most device files are managed as part of a traditionally mounted at /dev, possibly associated with a controlling daemon, which monitors hardware addition and removal at run time, making corresponding changes to the device file system if that's not automatically done by the kernel, and possibly invoking scripts in system or user space to handle special device needs.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related concepts (73)
Device file
In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a as if it were an ordinary . There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.
End-of-file
In computing, end-of-file (EOF) is a condition in a computer operating system where no more data can be read from a data source. The data source is usually called a or stream. In the C standard library, the character reading functions such as getchar return a value equal to the symbolic value (macro) EOF to indicate that an end-of-file condition has occurred. The actual value of EOF is implementation-dependent and must be negative (but is commonly −1, such as in glibc).
Ioctl
In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; the effect of a call depends completely on the request code. Request codes are often device-specific. For instance, a CD-ROM device driver which can instruct a physical device to eject a disc would provide an ioctl request code to do so.
Show more
Related courses (11)
COM-308: Internet analytics
Internet analytics is the collection, modeling, and analysis of user data in large-scale online services, such as social networking, e-commerce, search, and advertisement. This class explores a number
BIO-378: Physiology lab I
Le TP de physiologie introduit les approches expérimentales du domaine biomédical, avec les montages de mesure, les capteurs, le conditionnement des signaux, l'acquisition et traitement de données. Le
BIO-379: Physiology lab II
Le TP de physiologie introduit les approches expérimentales du domaine biomédical, avec les montages de mesure, les capteurs, le conditionnement des signaux, l'acquisition et traitement de données. Le
Show more
Related lectures (129)
Digital Image Correlation: PracticalCIVIL-510: Quantitative imaging for engineers
Focuses on the practical application of Digital Image Correlation for civil engineers, covering measuring displacement fields and computing strain fields.
Python Programming: File Handling and Exceptions
Explores file handling and exceptions in Python programming, covering reading, writing, and error handling strategies.
Social and Information Networks: RankingCOM-308: Internet analytics
Explores the significance of ranking in networks, emphasizing algorithms like PageRank and HITS for web page ranking.
Show more