From: Brian Silver <see@my.sig.for.address>
Subject: Re: HOW-TO KILL THREADS
Date: 1997/10/28 [thread overview]
Message-ID: <34563964.6488@my.sig.for.address> (raw)
In-Reply-To: 3455C9DB.CDC9DE0@zko.dec.com
Dave Butenhof wrote:
>
> Richard Spangenberg wrote:
> >
> > We are trying to install a database (MYSQL) in a Dec/ALpha OSF1 3.2 machine.
> > Everything is up and running but we are concerned that there appears to be
> > do way to stop a thread if it starts to eat up CPU time.
[Snip]
> So the answer is, "no, you can't". And furthermore, even if you were on
> a Digital UNIX 4.0 system, which has POSIX threads, with pthread_kill
> and cancellable I/O functions, you shouldn't WANT to. Once something is
> wrong with the PROCESS, destroying a misbehaving thread is usually just
> removing a symptom of the real problem.
Just to add a little to this, it seems to me like the
original poster wanted to kill a thread from outside
of the process. (Like using the kill command).
This isn't possible in 4.0 (and 3.2 for different reasons
that Dave outlined previously) because there is no way
for a generic process to get the necessary thread ids
of threads in any other generic process. Furthermore,
even if you had the necessary thread id, you'd still
need a mechanism that said "signal this thread, but
it lives in this process", and this just doesn't exist
unless you write it into both processes.
Even if you could cancel what you see as a "kernel"
thread on 4.0 (and decendants) it won't do remotely what
you expect it to do, and will (more than likely) cripple
the process in some way that that will be unclear and
non-predictable.
Kernel threads don't map 1-1 to user threads like they
did on 3.2 (and predecessors) as there is a 2-level
scheduling implimentation in DECthreads.
Bottom line: Nuke the process. You'll be happier in the end.
Brian.
--
Replace ! with @ for email address: silver!zko.dec.com
next prev parent reply other threads:[~1997-10-28 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-27 5:00 HOW-TO KILL THREADS Richard Spangenberg
1997-10-28 5:00 ` Dave Butenhof
1997-10-28 5:00 ` Brian Silver [this message]
1997-10-29 5:00 ` Richard Spangenberg
1997-11-03 5:00 ` Dave Butenhof
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox