Module 11 Vocab Flashcards

1
Q

Device Drivers

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

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

Device Registers

A

allow the device driver to read and write status of the devices like checking whether a printer is ready or not

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

Device Controllers

A

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

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

Data Buffers

A

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

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

ioctl system call

A

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

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
7
Q

Endpoint

A

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
7
Q

Direct m=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
8
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
9
Q

Socket

A

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

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

Socket API

A

a common set of functions, data structures, and constants across many OSes used to maintain and interact with sockets; Key functions include:

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

IP Address

A

32-bit number (in IPv4) and 64-bit number (IPv6) used to identify network endpoints and their location in the network

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

Port Number

A

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

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

socket()

A

creates a socket

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

bind()

A

Defines a socket port

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

listen()

A

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

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

connect()

A

initiates a connection with another socket

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

accept()

A

accepts a connection initiated by another socket

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

send(), sendto(), write()

A

send data flowing out of the socket

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

recv(), recvfrom, read()

A

receive data flowing into the socket

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

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

close(), shutdown()

A

closing a socket

20
Q

Network interface cards

A

hardware component that connects a machine to the network

20
Q

Little-endian

A

store lower order bytes in the lowest memory locations

21
Q

Device drivers for networking

A

software interrupt handlers for different Network Interface Cards

22
Q

Big-endian

A

store higher order bytes in the lowest memory locations

23
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

23
Q

Datagram socket

A

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

24
Q

What is the purpose of the Virtual File System (VFS)?

A

A: To provide a common interface for all file systems, allowing apps to use a universal API like read() or write() regardless of the underlying file type or device.

25
Q

What are the three types of special files in Unix-like systems?

A

A: Regular files (e.g., .txt), Block Special Files (e.g., disks), Character Special Files (e.g., keyboards).

26
Q

What’s the difference between block and character devices?

A

A: Block devices transfer fixed-size chunks (e.g., disks); character devices stream data one character at a time (e.g., keyboards).

27
Q

What role does a device driver play?

A

A: It translates high-level I/O operations into low-level hardware instructions and communicates with the device controller.

28
Q

What is the device controller?

A

A: Hardware that interfaces between the CPU and the physical device using registers and data buffers.

29
Q

What is Port-Mapped I/O?

A

A: A method where the CPU uses special instructions (IN, OUT) to talk to devices via specific I/O ports.
Ex: Less flexible; requires assembly code.

30
Q

What is Memory-Mapped I/O (MMIO)?

A

A: Devices are accessed using normal memory addresses, allowing standard instructions (MOV) in C to control hardware.

31
Q

What is the problem with busy waiting (polling)? For devices

A

A: The CPU wastes cycles constantly checking if the device is ready.

31
Q

How do interrupts improve I/O efficiency?

A

A: Devices alert the CPU only when they are ready, allowing the CPU to perform other tasks meanwhile.

32
Q

Why is MMIO preferred in modern systems?

A

A: It’s cleaner, supports memory protection, and allows easier programming in high-level languages.

33
Q

What is Direct Memory Access (DMA)?

A

A: A separate hardware unit that handles memory-to-device transfers, freeing the CPU from handling each byte.

34
Q

What does the I/O scheduler do?

A

A: Determines the order of I/O requests, optimizing for speed instead of strictly using first-come-first-serve.

34
Q

What are the layers of I/O software?

A

A: User-level I/O → Device-independent OS layer → Device Drivers → Interrupt Handlers → Hardware.

35
Q

Where does I/O scheduling usually happen?

A

A: In the OS kernel, but sometimes in drivers or hardware too.

36
Q

What is a socket?

A

A: A software endpoint used for sending and receiving data over a network. Identified by an IP + port number.

37
Q

What is the purpose of the socket API?

A

A: To allow applications to perform network communication using standard system calls.

38
Q

What is the difference between TCP and UDP?

A

A: TCP is reliable, connection-oriented, and ordered. UDP is fast, connectionless, and does not guarantee delivery.

38
Q

What layers do NICs (Network Interface Cards) operate on?

A

A: Physical and Data Link layers.

39
Q

When is UDP preferred?

A

A: For real-time apps like video streaming or online gaming, where speed matters more than reliability.

40
Q

When is TCP preferred?

A

A: For applications like web browsing, email, or file transfer where reliable delivery is essential.

41
Q

What are the steps for a TCP client?

A

A: Create socket → Resolve server address → Connect → Send/Receive → Close.

42
Q

What are the steps for a TCP server?

A

A: Create socket → Bind → Listen → Accept → Communicate → Close.

43
Q

What are the steps for a UDP client/server?

A

A: Client: Create socket → Send data
A: Server: Create socket → Bind → Receive data

44
Q

What is encapsulation in networking?

A

A: Each layer adds its own header to the data before sending it down to the next layer.

45
Q

What is the hourglass model of the Internet?

A

A: All systems use the common IP layer (the narrow waist), allowing different applications and physical networks to work together.

46
Q

Why is IP the “universal language” of the Internet?

A

A: It allows old and new devices to communicate as long as they support IP.

47
Q

What is byte ordering?

A

A: The order in which bytes are stored.

48
Q

Little-Endian

A

Little-endian: Used by Intel CPUs (least significant byte first)

49
Q

Big-Endian

A

Big-endian: Network standard (most significant byte first)

50
Q

What is DNS used for?

A

A: It translates human-readable hostnames (like google.com) into IP addresses.

51
Q

What is the range of well-known ports?

A

A: 0–1023 (e.g., port 80 for HTTP, port 25 for email)