L5 - Harry 19/10/2009 Acknowledgement Some parts of this...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Harry 19/10/2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Acknowledgement Some parts of this work are copied from the works of previous TAs and Professor Jack’s Notes.
Background image of page 2
Outline I/O Multiplexing Multithreaded Programming Message-Driven I/O
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
I/O Multiplexing Using Polling Program Flow ioctlsocket(); SOCKET_ERROR WSAGetLastError()==WSAEWOULDBLOCK (Notes2, page94-97)
Background image of page 4
I/O Multiplexing Using select() Operational Scenario Notes2, page 100-103
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Macros in Select() FD_CLR(s, *set); Remove the socket handle s from set. FD_ISSET(s,*set); Nonzero if s is a member of set. Otherwise, zero. FD_SET(s, *set); Add socket handle s to set. FD_ZERO(*set); Initialize the set to the null set. int select(int nfds, fd_set *readfds fd_set *wirtefds fd_set *exceptfds const struct timeval* timeout );
Background image of page 6
Resources Owning of Process and Thread Item Process Thread Code Y N Data Y N Resource Y N Heap Y N Stack N Y CPU Context N Y
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Thread Safety Certain function may have internal state (e.g.:
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/18/2010 for the course INFORMATIO IEG 4180 taught by Professor Jacky.b.lee during the Spring '09 term at CUHK.

Page1 / 22

L5 - Harry 19/10/2009 Acknowledgement Some parts of this...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online