Class Notes (807,524)
Canada (492,700)
CSC209H1 (41)
Karen Reid (20)


1 Page
Unlock Document

University of Toronto St. George
Computer Science
Karen Reid

I/O Multiplexing o I/O Multiplexing Model  The problem o When reading from multiple sources, blocking on one of the sources could be bad  an example of denial of service o Which of the system calls might block indefinitely? read & accept o One solution: one process for every client  resource taxing o Block I/O Model  Using select() for I/O multiplexing int select(int maxfdp1, fd_set *readset, fd_set *writeset, fed_set *exceptset, const struct timeval *timeout); o A call to select() returns when one of the file descriptors in one of the set is ready for I/O o If timeout is not NULL, then select() returns when a descriptor is ready or timeout time has passed o If timeout is zero, select() returns immediately after checking descriptors  Readiness o Nonblocking I/O Model o Ready to read when:  There is data in the receive buffer to be read  End-of-file state on the file descriptor  The socket is a listening socket and there is a connection pending  A socket error is pending o Ready to write when  There is space available in the write buffer  A socket error is pending o Exceptino condition pending when  TCP out-of-band data o We are typically interested in when bytes are available to be rea
More Less

Related notes for CSC209H1

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.