Podcast
Questions and Answers
What is the main issue with handling input from a TCP socket?
What is the main issue with handling input from a TCP socket?
Non-determinism and concurrency
What is one solution to handle non-determinism and concurrency in I/O operations?
What is one solution to handle non-determinism and concurrency in I/O operations?
Use nonblocking I/O
How can the O_NONBLOCK flag be set using fcntl()?
How can the O_NONBLOCK flag be set using fcntl()?
flags = fcntl(sock,F_GETFL,0); fcntl(sock,F_SETFL,flags | O_NONBLOCK);
What happens when a process uses nonblocking I/O and no input is available?
What happens when a process uses nonblocking I/O and no input is available?
What is the advantage of using blocking I/O over nonblocking I/O?
What is the advantage of using blocking I/O over nonblocking I/O?
What is the downside of using nonblocking I/O?
What is the downside of using nonblocking I/O?
What is an alternative solution to nonblocking I/O for handling concurrency and I/O non-determinism?
What is an alternative solution to nonblocking I/O for handling concurrency and I/O non-determinism?
How can multiple processes/threads be used to handle concurrency and I/O non-determinism?
How can multiple processes/threads be used to handle concurrency and I/O non-determinism?
What type of functions can be used to check multiple input sources at the same time?
What type of functions can be used to check multiple input sources at the same time?
What is the purpose of the fcntl() system call in nonblocking I/O?
What is the purpose of the fcntl() system call in nonblocking I/O?
Flashcards are hidden until you start studying