Re: ::select() and threads
Re: ::select() and threads
- Subject: Re: ::select() and threads
- From: email@hidden
- Date: Tue, 10 Apr 2007 20:00:10 -0700
Josh,
Can I infer from this that the CPU time that the scheduler spends in
my process, trying to determine which thread to run, is counted as
time spent by my process e.g. is part of the time that 'top -ocpu'
reports for my process actually the system scheduler checking thread
states in my process? Or do I have it completely wrong?
I'm just trying to understand -- I sincerely appreciate the info :-)
Regards,
John
Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com
This just means that when shark sampled your process, that thread
was blocked (not running) waiting for an event.
-josh
On Apr 10, 2007, at 2:05 PM, email@hidden wrote:
Hello all ...
I've a question -- under Darwin, is select() used to determine
which threads are ready to run? Shark is reporting that our app
spends most of its' time in select(), but the callstack that
represents the majority of select() calls isn't our select() loop,
it's something else:
ml_set_interrupts_enabled
thread_block_reason
thread_block
uiomove
selprocess
select
... which makes me think that the kernel is using select() to
determine when threads are ready. This makes some sense, as our
app is very multithreaded. If this is the case, how can I get our
(possibly too) multithreaded app to be kinder to the CPU under OSX?
Regards,
John
Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden