Communication
10 Questions
9 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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?

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

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

    <p>By convention, the file descriptor 0 refers to the standard input, the file descriptor 1 refers to the standard output, and the file descriptor 2 refers to the standard error.</p> Signup and view all the answers

    Which of the following statements about Internet addresses are correct?

    <p>The Internet protocol version 4 (IPv4) uses 32-bit addresses while the Internet protocol version 6 (IPv6) uses 128-bit addresses.</p> Signup and view all the answers

    Which of the following statements about multiplexing input/output are correct?

    <p>Event driven programs can be very efficient but they are more difficult to understand than regular programs since the program logic is scattered over many callback functions.</p> Signup and view all the answers

    Which of the following statements about name resolution are correct?

    <p>A computer name can resolve to multiple addresses belonging to the same address family.</p> Signup and view all the answers

    Which of the following statements about pipes are correct?

    <p>Pipes are unidirectional communication channels over which processes can send a stream of bytes.</p> Signup and view all the answers

    Which of the following statements about signals are correct?

    <p>Signals can interrupt the execution of blocking system calls.</p> Signup and view all the answers

    Which of the following statements about socket addresses are correct?

    <p>A struct sockaddr_in adds an IPv4 address member and a port number member to a generic socket address.</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser