From: Felipe Alfaro Solana <felipe_alfaro@linuxmail.org>
To: Helge Hafting <helgehaf@aitel.hist.no>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: O(1) scheduler & interactivity improvements
Date: 23 Jun 2003 12:18:29 +0200 [thread overview]
Message-ID: <1056363509.587.13.camel@teapot.felipe-alfaro.com> (raw)
In-Reply-To: <3EF6B5D4.10501@aitel.hist.no>
On Mon, 2003-06-23 at 10:09, Helge Hafting wrote:
> Felipe Alfaro Solana wrote:
> > As someone said before in the list, a process should be marked
> > "interactive" based on the fact that it's receiving user input,
>
> This is almost impossible to get right, except for a few very special
> cases like a single user working at the console. Unix is supposed to
> do much better than that - the user logging in via a serial port,
> (or more commonly these days, via the network) should get exactly
> the same responsiveness as that console user.
>
> Further, we may (sometimes) know that some devices is connected
> to a human. But how about that script reading one disk file
> and writing to another? Is it some cron job, did it start
> from some GUI menu with a user eagerly waiting for it to finish?
> Or did the user switch to the workd processor because he
> knows the script will take "forever"?
Maybe I have different a different idea of what "interactive" should be.
For me, an interactive process should have nearly-realtime response
times to user events. For example, if I click on a link in my web
browser's window, I want almost an immediate response:I want the process
to acknowledge the event, although it could be impossible to perform it
due to network latency, etc.
Currently, 2.5 kernels don't have a good "interactive" kernel, if we
stick to the previous definition of "interactive". I can easily starve
processes (XMMS) and moving windows around the screen do feel jerky and
laggy at best when the machine is loaded. For a normal desktop usage, I
prefer all my intensive tasks to start releasing more CPU cycles so
moving a window around the desktop feels completely smooth (sorry to
say, as Windows does). The same applies to repainting, or even launching
a new process.
>
>
> > for example, key strokes, mouse movements or any events received from any
> > input device, not based on its CPU usage. I think applications like XMMS
> > or mplayer shouldn't be considered interactive (at least, not until they
> > start interacting with user),
> The're interactive if the user is staring at / listening to the output.
Or the user is feeding events to it, for example, by dragging a window,
clicking the mouse or pressing keys. If a process has received user
input in the past, ir's pretty probable that the process is an
interactive one.
I don't consider compiling the kernel an interactive process as it's
done almost automatically without any user intervention. XMMS is not a
complete interactive application as it spends most of the time decoding
and playing sound.
> Use a multithreaded word processor and you'll get exactly this behaviour,
> with the current system. See above.
I agree. The word processor example was a bad one. Most word processors
are multithreaded.
> > For terminal based, interactive applications (like pine, vi, and
> > company), which are connected to tty devices, a user input event could
> > make the scheduler boost the process priority for a brief time (and
> > then, reduce the priority in a nearly quadratic fashion until reaching
> > it's original, or a lower, priority) to give it a better response time
> > and increase the interactive feeling.
> >
> This works already, because the app slept waiting for that keystroke.
So then, why I can easily starve the X11 server (which should be marked
interactive), Evolution or OpenOffice simply by running "while true; do
a=2; done". Why don't they get an increased priority boost to stop the
from behaving so jerky?
> > by increasing the target process priority (it normally runs as root)?
> > Should the window manager increase the priority of the process which
> > owns the current foreground, active window? Solaris seems to work this
>
> It can't without that X protocol change, for the "foreground process",
> the "window manager" and the "X server" may all be running on three
> different machines.
That's what is said at course SA-400 Solaris 8 Tuning from the Solaris
Official Curriculum. In fact, it works when working locally on a Solaris
8 or 9 machine.
next prev parent reply other threads:[~2003-06-23 10:04 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-22 16:07 Felipe Alfaro Solana
2003-06-22 20:00 ` Davide Libenzi
2003-06-23 12:50 ` Jesse Pollard
2003-06-23 8:09 ` Helge Hafting
2003-06-23 10:18 ` Felipe Alfaro Solana [this message]
2003-06-23 16:21 ` Daniel Gryniewicz
2003-06-23 18:59 ` Felipe Alfaro Solana
2003-06-23 19:21 ` Memory? " Roger Larsson
2003-06-23 16:47 ` Helge Hafting
2003-06-24 18:12 ` Bill Davidsen
2003-06-25 21:41 ` Helge Hafting
[not found] ` <5.2.0.9.2.20030624215008.00ce73b8@pop.gmx.net>
2003-06-26 9:59 ` Helge Hafting
2003-06-26 10:39 ` Mike Galbraith
2003-06-26 14:50 ` Bill Davidsen
2003-06-26 23:10 ` Timothy Miller
[not found] ` <Pine.LNX.3.96.1030626104733.17562D-100000@gatekeeper.tmr.c om>
2003-06-27 6:36 ` Mike Galbraith
2003-06-27 8:18 ` Helge Hafting
2003-06-27 9:46 ` Mike Galbraith
2003-06-27 11:39 ` Helge Hafting
2003-06-27 12:18 ` Mike Galbraith
2003-06-28 3:51 ` Bill Davidsen
[not found] ` <Pine.LNX.3.96.1030627234408.25848A-100000@gatekeeper.tmr.c om>
2003-06-28 5:44 ` Mike Galbraith
2003-06-28 14:34 ` Helge Hafting
2003-06-29 6:08 ` Mike Galbraith
2003-06-30 13:37 ` Bill Davidsen
2003-06-27 6:54 ` jw schultz
2003-06-23 10:50 John Bradford
2003-06-23 11:22 ` Felipe Alfaro Solana
2003-06-23 11:36 ` Denis Vlasenko
2003-06-23 12:44 John Bradford
2003-06-23 16:32 ` Helge Hafting
2003-06-23 19:00 ` Felipe Alfaro Solana
2003-06-23 19:17 ` Helge Hafting
2003-06-24 22:41 ` Timothy Miller
2003-06-25 21:42 ` Helge Hafting
2003-06-25 23:16 ` Timothy Miller
2003-06-23 21:48 ` Bill Davidsen
2003-06-23 19:20 John Bradford
2003-06-23 23:32 John Bradford
2003-06-24 4:13 ` Bill Davidsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1056363509.587.13.camel@teapot.felipe-alfaro.com \
--to=felipe_alfaro@linuxmail.org \
--cc=helgehaf@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®