Subject: Re: pthreads in userland, signals, and itimer.
To: Jaromir Dolecek <dolecek@ics.muni.cz>
From: Dr. Lex Wennmacher <wennmach@geo.Uni-Koeln.DE>
List: tech-kern
Date: 11/09/1999 14:03:34
On Nov 9,  1:11pm, Jaromir Dolecek wrote:
> Subject: Re: pthreads in userland, signals, and itimer.
> What do we gain with such flexibility ? That a program might use several
> separate threading libraries at the same time ? Isn't it insane ?

We gain the ability to share timers in a sane way. Currently a process can only
use one real timer. Some libraries need timers for their own purposes (e.g.
threading libraries [to implement thread scheduling, that's what it is for,
isn't it] or checkpointing libraries to trigger the writing of a checkpoint).
A program which uses an itimer for its own purpose can't currently use my
checkpointing library. If I some day support pthreads in chkpt, we'd need at
least 3 timers.

Since applications may use timers for their own purpose there are obvious
conflicts. There are ways to "share" signals, but, as Michael coined it, it is
HARD black magic. I never seriously considered this for my checkpointing
library, and avoiding this hard black magic was Michael's initial intent.

Lex