Log in

No account? Create an account
brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Thoughts of the day [Feb. 22nd, 2002|07:00 pm]
Brad Fitzpatrick
WMs giving hints to VM
I wonder if any OS lets the window manager give it hints about which processes are in use by which windows are minimized or on a different desktop. I'm not proposing the page replacement is done in user space by the WM ... I'm saying that if the VM has two processes hogging the same amount of memory and it needs to swap one out, it could have more information from the WM regarding which would be a better choice. It could even be an unprivileged thing ... any user could give VM hints. The information would only be used in a case where the VM would have otherwise picked randomly between processes to swap out.

(before I get bitch slapped: yes, the VM swaps out pages, not processes... but you know what I mean. it'd prefer to swap out pages of a minimized process over an open one, all else being equal.)

But it probably wouldn't matter... having a window open on the screen means your mouse is probably moving over it from time to time en route to other places on the screen, and thus it's getting messages from the windowing system, eating more CPU, and the VM could use that info instead, if it were so inclined. In the end, it probably wouldn't make much difference, but it might make for an interesting research project or something.

Level of inflection in language affecting rap
English has very little inflection. German has tons. It'd be neat to look at a number of languages with different levels of inflection and analyze rap music from that culture and see how it affects it. Would languages with more inflection use a smaller percentage of their vocabulary in end-sentence rhymes? I really have no clue. This would also be an interesting research project.

Note that I don't have the requisite skills to even begin either of the two projects. They're just interesting.

[User Picture]From: visions
2002-02-22 10:54 pm (UTC)
the hinting could be detrimental though as well, on multi-user systems atleast.

in all honestly though, you could psuedo accomplish that with a very simple modification to your wm. anytime you minimize a window, change its process priority. when it comes back into focus, move it back up. i have a feeling that the overhead of that would make it not worth the effort, but who knows.
(Reply) (Thread)
[User Picture]From: grendelkhan
2002-02-23 08:54 pm (UTC)
Isn't renicing a process generally a quick-and-easy thing? My UNIX coding is rusty (okay, it never was in the first place, so it can't get rusty) but I don't see why the WM can't renice processes depending on which desktop they're linked to, whether they're minimized, etc.

Then again, this may or may not be what the user wants. I mean, if you have to keep the CD burning app on top all the time to prevent buffer underruns, that's no fun.

Then gain, process priority is hardly a passthrough interface to the VM. But is that what you really want here? Hmm.
(Reply) (Parent) (Thread)