[okl4-developer] No. of threads
Nelson Tam
nelson at ok-labs.com
Tue Feb 12 11:07:10 EST 2008
Hi Peter,
There are 3 possible cases:
1. If you're running in the kernel. You can poke around pistachio/src/
scheduler.cc
and pistachio/include/prioqueue.h and iterate over the scheduler
priority queue. If
you want to know about the thread state you can take a look at
pistachio/include/threadstate.h.
You probably have to change some of the priority queue's members to be
public in
order to access them from other classes inside the kernel.
2. If you're running outside the kernel (e.g. Iguana). You cannot,
and should not be
allowed to, have access to this information because it is considered
sensitive.
3. If you're debugging. Once you enter KDB (by hitting 'ESC' or 'Ctrl-
k' during
execution), press 'q' and you will see the thread priority queue.
Thread ids enclosed
in parentheses are blocked threads.
Hope this helps,
Nelson.
On 12/02/2008, at 10:48 AM, Peter Nguyen wrote:
>
> Just out of curiousity, is there any way of finding out how many
> threads are executing in the system at a given point in time (also
> including suspended threads)?
--
(nt)
Nelson Tam
nelson at ok-labs.com
More information about the Developer
mailing list