Re: [Strmod-devel] Yay!
Status: Alpha
Brought to you by:
omnifarious
From: Eric M. H. <ho...@om...> - 2001-07-05 18:09:24
|
On Thu, Jul 05, 2001 at 12:11:41AM -0000, Roz Thomas wrote: > What's a starvation bug? I can't find a definition in my Unix book. Starvation is a problem that can occur in systems that have some mechanism of allocating resources (usually CPU resources) to a process or part of the program. If resources are never assigned to a certain part of the program, that part 'starves'. In the case of StreamModule, there was a bug that caused high bandwidth connections to constantly use the CPU and not let any other connections process any of their data. It was solved by making various things voluntarily give up the CPU if it appears, from some simple heuristic, that they are hogging it. I tested it using PortForward by having a forwarded connection to localhost:9, the discard service. The discard service discards every character it reads, so it's a perfect service to send tons of data to. I then had a local client connect to the port that PortForward was forwarding to port 9. It sent an endless stream of zeros. Then I connected to a different port that was forwarded to port 23 (the telnet port). If I could log in, the problem wasn't there. If I couldn't, it was. Before my fix, a telnet from a remote host to port 23 would hang in that situation. After my fix, it worked with no noticeable difficulty. Have fun (if at all possible), --=20 "It does me no injury for my neighbor to say there are twenty gods or no Go= d. It neither picks my pocket nor breaks my leg." --- Thomas Jefferson "Go to Heaven for the climate, Hell for the company." -- Mark Twain -- Eric Hopper (ho...@om... http://www.omnifarious.org/~hopper)= -- |