Module 11: External I/O Flashcards

1
Q

device driver

A

a 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

interrupt handler

A

a separate 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

port-mapped I/O

A

special assembly language instructions that allow the device driver to read directly from the external device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

memory-mapped I/O

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

direct memory access (DMA)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

checksum

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ioctl system call

A

allows your user application to make requests of devices and is typically used for the process of hardware configuration, command line interface, and building upon kernel functionality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

I/O scheduling

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

endpoint

A

remote device capable of communication over a TCP/IP network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

socket

A

a network abstraction uniquely identified by an IP address and port number; a network abstraction used to receive and send data from a given 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

IP address

A

32 bit number in IPv4

128 bit number in IPv6

used to identify endpoints and their location in the network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

port number

A

16-bit 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

socket API

A

common set of functions, data structures, and constants across many OSes used to maintain and interact with sockets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

socket()

A

creates a socket

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

bind()

A

defines the socket port

17
Q

listen()

A

sets the socket to start listening for data after it has been bound

18
Q

connect()

A

initiates a connection with another socket

19
Q

accept()

A

accepts a connection initiated by another socket

20
Q

send(), sendto(), write()

A

send data flowing out of the socket

21
Q

recv(), recvfrom(), read()

A

receive data flowing into the socket

22
Q

close(), shutdown()

A

closing a socket

23
Q

domain name system (DNS)

A

a protocol used to map hostnames to IP addresses, which is used to identify well-known servers in the network

24
Q

network interface cards

A

hardware component that connects a machine to the network

25
Q

device drivers for networking

A

software interrupt handlers for different network interface cards

26
Q

little endian

A

store lower order bytes in the lowest memory locations

27
Q

big endian

A

store higher order bytes in the lowest memory locations

28
Q

stream socket

A

uses TCP as the underlying protocol; connection oriented, such that, providing a two way stream of bytes; guaranteed reliable, at-most once, and in-order delivery

29
Q

datagram socket

A

uses UDP as the underlying protocol; connectionless, sending individual messages in chunk bytes; no guarantee of reliable, at most once, and in order delivery