> I'm glad you've asked ;-) In fact, there's a bigger context and it is
> around managing processes run by cpu(1) from the terminal host. I was
> planning on writing an email on that subject to this list over the
> weekend but I need to amass some level of intelligence in that area
> first. 
> 
> For now, though, the easiest way to illustrate my problem would be to
> imagine a situation where you want to write some data into a Data
> segment of the process that is waiting for the IO. Now, waiting for 
> the IO is almost as good as state as Stopped (the process is stuck in
> kernel waiting to be put back on the runqueue) so one would expect the
> transition between these 2 states to be almost trivial. Literally, all
> I'm asking is -- "dear kernel, please don't advance this process even
> if you otherwise can". All I need is a frozen state so that I can
> manipulate some data. Yet, I can't figure out how to do that:

i don't think the kernel has this level of control.

let's suppose that we have a process that gets a stop message
that's doing i/o.  let's suppose that it's doing io to a particularly
cranky device with lots of neat locks that really hates getting
interrupted.  i don't know, something esoteric — say, ata.  are you
really so sure that you can do what you want to this process
when ata io is going on?

i don't think this is safe unless all copies back to user space are
done by some kernel function that does all the proper checking.
and you have some way of unlocking safely from any part of the
i/o code.

i sure would like to hear from someone who knows more about
what went into the design of notes.  i don't think i've thought of
all the scary dark corners.

- erik


Reply via email to