Messages in this thread | | | Date | Tue, 28 Mar 2006 21:56:20 -0800 | From | "Ray Lee" <> | Subject | Re: interactive task starvation |
| |
On 3/28/06, Lee Revell <rlrevell@joe-job.com> wrote: > Can you explain why terminal output ping-pongs back and forth between > taking a certain amount of time, and approximately 10x longer? [...] > Why does it ping-pong between taking ~0.08s and ~0.75s like that? The > behavior is completely reproducible.
Does the scheduler have any concept of dependent tasks? (If so, hit <delete> and move on.) If not, then the producer and consumer will be scheduled randomly w/r/t each other, right? Sometimes producer then consumer, sometimes vice versa. If so, the ping pong should be half of the time slow, half of the time fast (+/- sqrt(N)), and the slow time should scale directly with the number of tasks running on the system.
Do any of the above WAGs match what you see? If so, then perhaps it's random just due to the order in which the tasks get initially scheduled (dmesg vs ssh, or dmesg vs xterm vs X -- er, though I guess in that latter case there's really <thinks> three separate timings that you'd get back, as the triple set of tasks could be in one of six orderings, one fast, one slow, and four equally mixed between the two).
I wonder if on a pipe write, moving the reader to be right after the writer in the list would even that out. (But only on cases where the reader didn't just run -- wouldn't want a back and forth conversation to starve everyone else...)
But like I said, just a WAG.
Ray - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |