Podcast
Questions and Answers
Which of the following statements about blocking and non-blocking file descriptors are correct?
Which of the following statements about blocking and non-blocking file descriptors are correct?
- Newly allocated file descriptors are usually in non-blocking mode.
- A non-blocking read system call returns EINTR if it would have to block.
- Blocking mode causes read system calls to block if there is no pending data and write system calls to block if there is no capacity to write data. (correct)
- In non-blocking mode, system calls will fail instead of blocking the calling process or thread. (correct)
Which of the following statements about connection-less datagram sockets are correct?
Which of the following statements about connection-less datagram sockets are correct?
- Due to the low overhead, most of the Internet communication uses connection-less datagram sockets.
- Connection-less datagram sockets requires that applications handle communications errors as part of the application logic. (correct)
- Connection-less datagram sockets have very low overhead. (correct)
- Applications can use a single datagram socket to communicate with many servers concurrently. (correct)
Which of the following statements about connection-oriented stream sockets are correct?
Which of the following statements about connection-oriented stream sockets are correct?
- Stream sockets ensure that data is delivered in the order it was sent; any problems caused by missing or duplicated or out-of-order packets are dealt with by the kernel. (correct)
- The kernel passes newly established connections one-by-one to the application by allocating a file descriptor for a new socket representing the connection. (correct)
- A server prepares a socket and then asks the kernel to listen for incoming connection requests. (correct)
- Applications can use a single stream socket to communicate with many servers concurrently.
Which of the following statements about file descriptors are correct?
Which of the following statements about file descriptors are correct?
Which of the following statements about Internet addresses are correct?
Which of the following statements about Internet addresses are correct?
Which of the following statements about multiplexing input/output are correct?
Which of the following statements about multiplexing input/output are correct?
Which of the following statements about name resolution are correct?
Which of the following statements about name resolution are correct?
Which of the following statements about pipes are correct?
Which of the following statements about pipes are correct?
Which of the following statements about signals are correct?
Which of the following statements about signals are correct?
Which of the following statements about socket addresses are correct?
Which of the following statements about socket addresses are correct?
Flashcards
Blocking file descriptors
Blocking file descriptors
Read/write system calls block if no data/capacity.
Connection-less datagram sockets
Connection-less datagram sockets
No connection, applications handle errors.
Connection-oriented stream sockets
Connection-oriented stream sockets
Data order guaranteed, kernel handles errors.
File descriptor 0
File descriptor 0
Signup and view all the flashcards
File descriptor 1
File descriptor 1
Signup and view all the flashcards
File descriptor 2
File descriptor 2
Signup and view all the flashcards
IPv4 address
IPv4 address
Signup and view all the flashcards
IPv6 address
IPv6 address
Signup and view all the flashcards
Socket address struct sockaddr_in
Socket address struct sockaddr_in
Signup and view all the flashcards
Multiplexing I/O
Multiplexing I/O
Signup and view all the flashcards