artswrapper defanged

Martin Konold konold at kde.org
Tue Jul 23 07:35:02 BST 2002


On Monday 22 July 2002 11:28 pm, Andreas Pour wrote:

Hi,

> You can fight that by having the monitor place a timestamp in a file
> when a deprioritization occurred, and refuse to start a new high
> priority process for some time lag - say 5 seconds - after that, maybe

Yeah, this is a traditional way to fight a DOS and indeed does work.

> incrementing each time a deprioritization occurs within a specified
> window.  This just requires a file with two fields, a time stamp and
> counter.

You do not really need a file though.

> > The "process listing / acquiring cpu usage" part, for which no portable
> > solution exists.
>
> Maybe so.  Still, there are some systems - including the most
> commonly-used one - where a solution does exist.

> > Subjective feeling on my part. I would be scared if I logged into KDE and
> > saw this "artsguard" process running, which I could not kill anymore.
>
> Well, you should be able to kill it as root.  You cannot kill httpd as a
> user either, or initd, or many other processes.

Well, I think the following is nicer:
artswrapper launches artsguard running at priority N+1 and artsd at priority 
N. (BTW: when using SCHED_RR instead of SCHED_FIFO you can run both at the 
same priority). artsguard is then sampling the ressource usage of artsd. I do 
not think that there is a need for artsguard to run as root because artsd 
also does not run as root.
Both artsd and artsguard are spawned by artswrapper so it should be possible 
to track their (and all other fork'ed processes ) parent/child relationship 
at any time.

> > tearing their system down, but about artsguard possibly destroying their
> > pet realtime processes. I know that the number of people affected by this
> > is smaller than the number of people affected by the problem now, but it
> > kind- of indicates that the solution is wrong.

artsguard should use knowledge about which processes belong to its list of 
beeing watched.

> > > > Writing the external unkillable watchdog will add an extremely ugly
> > > > piece of code. I don't think users will be happy to see "artsguard"
> > > > running even after they logged out of KDE (but it has to, for if you
> > > > could terminate it,...).
> > >
> > > It could kill itself when no real-time processes are running any more. 
> > > For most people, that would be when they exit KDE.

I do not think that this problem is real, because artsguard has chance of 
knowing which processes are to be watched.

Regards,
--martin
-- 
Dipl.-Phys. Martin Konold
Stauffenbergstraße 107, 72074 Tübingen, Germany
email: konold at kde.org




More information about the kde-core-devel mailing list