Gavrie Philipson wrote: >Shaul Karl wrote: >> >> I found the last paragraph of subsection 12.1.1 of the "Linux Application >> Development" (3rd edition) contradicting my knowledge. Am I right that it is >> not accurate, or do I missing something essential? >> >> Trying to quote the paragraph without copying the entire subsection, I get: >> >> Although nonblocking I/O allows us to switch easily between file descriptors, >> it has a high price. If it was up to the polling processes then they would >> constantly be running - never blocks. Which inflicts a heavy performance >> penalty on the system as the OS can never put these processes to sleep (try >> running 10 processes like the one that was discussed previously and see how it >> affects system performance). >> >> "the OS can never put these processes to sleep"? - Perhaps in the Windows >> world, but with Linux/Unix? > >Quoting the late W. Richard Stevens in "UNIX Network Programming" (2nd >ed, p. 145): A bit off topic, but as a W. Richard Stevens fan, when did he become "late"? > >"...The application is continually polling the kernel to see if some >operation is ready. This is often a waste of CPU time..." >So, of course, the book you quoted is accurate. > >If you're continually calling the kernel, how could it put your app to >sleep? That's what they invented select/poll for. > >Gavrie. > >-- >Gavrie Philipson >System Administrator >Netmor Applied Modeling Research Ltd. > >================================================================= >To unsubscribe, send mail to [EMAIL PROTECTED] with >the word "unsubscribe" in the message body, e.g., run the command >echo unsubscribe | mail [EMAIL PROTECTED]
begin:vcard n:Feiglin;Daniel tel;cell:972 53 869986 tel;fax:972 9 862 1052 tel;home:972 9 832 0939 tel;work:972 9 861 6204 x-mozilla-html:FALSE org:Dilog Computers Ltd. adr:;;POB 36;Shavei Shomron, Mobile Post;;44858;ISRAEL version:2.1 email;internet:[EMAIL PROTECTED] x-mozilla-cpt:;-20112 fn:Daniel Feiglin end:vcard