Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 2003 10:50:28 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>, freebsd-hackers@freebsd.org
Subject:   Re: Help with understanding process state, context switching and
Message-ID:  <200302061850.KAA08537@InterJet.elischer.org>

next in thread | raw e-mail | index | archive | help
 signals
In-Reply-To: <xzpy94tpqvt.fsf@flood.ping.uio.no>
Message-ID: <Pine.BSF.4.21.0302061047210.97117-100000@InterJet.elischer.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

The only way it makes sense to talk about suspending
a process in user space from the kernel, would be in a MP system. in a
UP system, if you are in the kernel, then there is no process in user
space. (it trapped into the kernel whenever whatever interrupt that
stasrted you running happenned).  In SMP you may need to set some flag
and send an IP to all teh processes to ensure that the process enters
the kernel to see the flag.  Depending on what you wnat to do, it is
possible that ptrace (as DES says) is what you want, or maybe just a 
SIGSTOP will do.


On Thu, 6 Feb 2003, Dag-Erling Smorgrav wrote:

> Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> writes:
> > In short: I need to stop (suspend) some process from the kernel, when
> > that process is in user mode and get information about its general-purpose
> > registers, its VM structures, etc.
> 
> Have you looked at ptrace(2)?  That's what gdb(1) uses.  You can get
> additional information about memory maps etc. from procfs.
> 
> DES
> -- 
> Dag-Erling Smorgrav - des@ofug.org
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302061850.KAA08537>