Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 29s8 days 9 hours 54 minutes 29 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 29s8 days 9 hours 54 minutes 29 seconds.

Sign in to watch this lesson
Applications and Sockets · 4:28
Two ways to serve many connections: a blocking thread per connection, or one thread running OSTEP's event loop over select() or poll(). Measured on this Mac with one active and thousands of idle loopback connections, poll's round trip grows with every idle socket (about 13 µs to 873 µs), select stops at FD_SETSIZE, a process can't have more than 2048 threads, and kqueue stays flat; epoll, its Linux counterpart, is taught with level- and edge-triggered modes. Finally, one blocking handler stalls every other client for 50 ms.