Date: Fri, 14 Dec 2001 22:51:56 -0500 From: Kenneth Culver <culverk@yumyumyum.org> To: Julian Elischer <julian@elischer.org> Cc: arch@freebsd.org Subject: Re: KSEs and PTRACE/PROCFS Message-ID: <20011215035154.A37FF37B41A@hub.freebsd.org> In-Reply-To: <Pine.BSF.4.21.0112141537100.17119-100000@InterJet.elischer.org> References: <Pine.BSF.4.21.0112141537100.17119-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 14 December 2001 08:14 pm, you wrote: > On Fri, 14 Dec 2001, Kenneth Wayne Culver wrote: > > I don't know how to do this, but would it be possible to allow a user to > > somehow pick a thread if he/she wanted to? That would be most useful... > > > > Ken > > A Not very easily, but let's examine.... > > A user would want to trace a single thread in the program, but threads > inside the userland part of the program are invisible to the kernel. It > supplies some contexts to allow the userland scheduler to run things in > parallel, but it doesn;t know which userland thread is being multiplexed > onto which kernel thread. The kernel threads are 'created' when the > program enters the kernel, and 'destroyed' when the system call completes. > (not really, they are cached) so one thread in userland will hop from one > kernel thread to another at great speed. > > The kernel actually has ACCESS to a key that might indicate the > user thread running (this just occured to me) (the syscall return status > block shuld be 'per user thread'), but even using that, it doesn't know > how to associate that number with a given thread. > > Now assuming we got past this, what would be the desired behaviour? > > One thread single steps and all others proceed at normal speed? > all other threads suspended? > what of threads in another KSE group? (different scheduler class) well, I would think that the threads that don't rely on data from the currently stopped thread should stop, just the thread that I want to stop should stop, along with any threads that rely on data from that thread... is that possible? I would also think that threads in a different KSE group could keep running given the same conditions.... as long as no threads there rely on data from the thread you stopped, I guess they could keep going... Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011215035154.A37FF37B41A>