M11: External I/O (Input/Output) Devices Flashcards
Device drivers:
separate device driver exists for each device; the device driver is software that interacts with the interrupts generated by its respective hardware
component, acting as an interface between the external devices and the OS; the driver usually runs as a process
Interrupt handler :
a separate interrupt handler exists for each device that
may generate an interrupt; executes (e.g. as a callback function in C) on interrupt; the device driver communicates with the OS through interrupts
Device controllers :
a hardware component that receives data from its
respective device, stores it locally, and passes it to the device driver; the controller makes sense of signals going in and coming out from the CPU
Device registers :
allow the device driver to read and write status of the
devices like checking whether a printer is ready or not
Data buffers :
enable one to write data to the controller, which is then
subsequently pushed onto the external devices; any data that we write to the disk, or read from the disk, is first buffered in the data buffers of the device controllers, then can be read by the device drivers
Port-mapped I/O :
special assembly language instructions that allow the device driver to read directly from the external device
Memory mapped I/O :
reading or writing to particular addresses that correspond to a location in main memory, control register, of address in the data buffer of a specific I/O device. I/O operations at these addresses are automatically converted to corresponding device control registers or data buffers, reducing the
burden on the programmer. This technique requires memory caching to be disabled and the MMU to distinguish the I/O requests from legitimate memory
accesses.
Direct memory access (DMA):
to avoid involving the CPU in the data transfer
between the physical memory and external device, a separate hardware co-processor called the DMA is tasked with handling I/O requests
Checksum:
a sequence of characters, generated by applying cryptographic hash function to data (e.g. in a file). Using the checksum, a system can validate
whether different copies of data match.
ioctl system call :
allows your user application to make requests of devices and is typically used for the purposes of hardware configuration, command line interface, and building upon kernel functionality
I/O scheduling :
many processes create I/O requests and the I/O scheduler determines the order in which to send these requests to the external devices while preserving interactivity
Endpoint:
a remote device capable of communication over a TCP/IP network
Socket :
a network abstraction uniquely defined by an IP address and port number; a network abstraction used to receive and send data from a give endpoint identified by the IP address for the network service identified by the port number; sockets allow inter or intra machine processes to communicate over the
network
A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent to.
IP address :
32-bit number (in IPv4) and 64-bit number (IPv6) used to
identify network endpoints and their location in the network
○ Port number :
16-bit unsigned integer; ports are associated with the IP
address of the machine being used in networking and the type of network protocol being used in the communication; each port is used to handle a
different network service so that the machine can execute multiple services and sessions of the same service; port numbers 0-1023 are reserved for well-known services and port numbers 1024+ can be used by a developer in general applications