Kernel Modules and Device Drivers Flashcards
What is the File Interface?
An abstraction to organize data into directories and files. Allows for querying data therein.
What is the IOCTL device?
Input/Output Control. Allows for users and their applications to communicate with device drivers. Can configure devices or query special files.
What is /proc?
A virtual file system that provides access to the kernel internal state. Mostly readonly. Can query statistics or process information in the kernel.
What is the difference between a Character Device and a Block Device?
A Character Device is unbuffered, and is accessed sequentially (by necessity). A Block Device provides access to data via a buffer, and can allow for random access.
TRUE/FALSE: The mouse is an example of a Character Device.
TRUE.
TRUE/FALSE: Terminals are an example of a Character Device.
TRUE.
TRUE/FALSE: A random number generator is an example of a Block Device.
FALSE: It is a character device.
TRUE/FALSE: A hard drive is an example of a Block Device.
TRUE.
What is DMA?
Direct Memory Access. Often hardware-enabled data transfer that avoids the CPU to reduce workload. Faster data transfers, but needs additional coordination with the OS.
Name a common use of DMA.
(many answers)
GPU’s, GPGPU’s, TPU’s
HDD’s, SSD’s, CSD’s
Network Interfaces
Sound Cards
TRUE/FALSE: DMA only allows for memory-to-memory access.
FALSE: DMA allows for that plus I/O-to-memory and memory-to-I/O.
TRUE/FALSE: Interrupts operate exclusively in hardware.
FALSE: Interrupts can also be handled by software.
What is the key factor in a GPU’s being better than a CPU in certain cases?
Parallel processing.