chapter6 - Chapter 6: I/O Mul1plexing Figure 6.1:...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 6: I/O Mul1plexing Figure 6.1: Blocking I/O model. Figure 6.2: Nonblocking I/O model. Figure 6.3: I/O mul1plexing model. Figure 6.4: Signal ­Driven I/O model. Figure 6.5: Asynchronous I/O model. Figure 6.6: Comparison of the 5 I/O models. #include <sys/select.h> #include <sys/1me.h> int select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, const struct 1meval *1meout); struct 1meval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ } void FD_ZERO(fd_set *fdset) void FD_SET(int fd, fd_set *fdset); void FD_CLR(int fd, fd_set *fdset); Int FD_ISSET(int fd, fd_set *fdset); Figure 6.7: Summary of condi1ons that cause a socket to be ready for select. Figure 6.8: Condi1ons handled by select in str_cli. Figure 6.9: Implementa1on of str_cli func1on using select Figure 6.14: TCP server before first client has established a connec1on. Figure 6.15: Data structures for TCP server with just a listening socket. Figure 6.16: TCP server ader first client has established a connec1on. Figure 6.17: Data structures ader first client connec1on is established. Figure 6.18: TCP server ader second client connec1on is established. Figure 6.19: Data structures ader second client connec1on is established. Figure 6.19: Data structures ader first client terminates its connec1on. Figure 6.22:TCP server using a single process and select loop. Figure 6.22:TCP server using a single process and select loop. Figure 6.22:TCP server using a single process and select loop. ...
View Full Document

This note was uploaded on 06/11/2011 for the course CSCE 515 taught by Professor Huang,c during the Spring '08 term at Columbia SC.

Ask a homework question - tutors are online