gusl: (Default)
[personal profile] gusl
One major annoyance of using computers is waiting for applications to respond, because other applications are hogging the CPU. Somehow, the simple idea of prioritizing whatever window is active either (a) isn't commonly implemented or (b) doesn't work very well.

Would having a multi-core processor or a multi-processor machine address this, beyond the simple speed-up?

(no subject)

Date: 2010-04-26 11:00 pm (UTC)
From: [identity profile] robbat2.livejournal.com
The problem is partially what window is active, finding what processes that represents, and passing that information all the way down to the scheduling. Most user complaints I have experienced are about the lag when switching between applications, not lag within a single application.

We also run into a problem of defining what 'active window means'. The window(s) in focus? The visible windows? Does the window in question represent exactly one process, some part of a process, or multiple processes?

Multiple cores do help this, but only so much as most OS models follow a model that a given thread within a process can only use 100% of any single core at a time. Sometimes all threads in a process must be on that core.
Plugins on Firefox seem to be esp. bad at this, having each plugin running at most one instance, regardless of how many tabs it has, instead of a thread per tab/plugin combination (with the non-active tabs mostly suspended or deprioritized).

(no subject)

Date: 2010-04-26 11:43 pm (UTC)
From: [identity profile] gustavolacerda.livejournal.com
<< having each plugin running at most one instance, regardless of how many tabs it has >>

so is the switching between the different tabs handled by the plugins themselves?

(no subject)

Date: 2010-04-26 11:50 pm (UTC)
From: [identity profile] robbat2.livejournal.com
The plugins are expected to thread internally yes. Side effect that even if your browser isolates the plugin from the core browser, crashing the plugin can affect multiple tabs :-(.

(no subject)

Date: 2010-04-26 11:45 pm (UTC)
From: [identity profile] gustavolacerda.livejournal.com
I'd love to restrict how much CPU I allow each application to use... but I think it's more standard to give them a RAM quota than a CPU quota.
Edited Date: 2010-04-26 11:45 pm (UTC)

(no subject)

Date: 2010-04-26 11:51 pm (UTC)
From: [identity profile] robbat2.livejournal.com
Doable with some trickery on Linux, but there is no UI for it at all. Also raises questions about hard quota vs. soft quota, and borrowing from past or previous timeperiods.

(no subject)

Date: 2010-04-27 09:19 am (UTC)
From: [identity profile] peamasii.livejournal.com
In Linux you can use ulimit to specify max memory limits per process and nice to specify priority. In Windows you can go have a coffee while a runaway process continues to confuse the garbage collection and the OS swaps to death.

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags