Hello Dianne & all good people here

Concerning binder thread pool.

 I am new to the android and I am confused when  mentioned thread pool but 
I do not see in binder code
any thread creation ( aka kthread_create), the only thread that exists in 
binder driver is Garbage collector  .
Looking at he code I see that there is binder_thread object that counts 
ready_threads
My understanding that user space spawns threads but binder driver may limit 
access to service if  service application sets this limit calling ioctl( 
BINDER_SET_MAX_THREADS).

Can somebody clarify this issue ? (no threads created in kernel ?)



ThanX, 
Failuch

On Thursday, May 6, 2010 10:15:57 PM UTC+3, Vesmar wrote:
>
> Hi all, 
>
> I m studying how Android creates new processes and found two scenarios. 
>
> when I am running native programs on a terminal on Android (ps, ls, 
> mkdir, etc) all programs are created in the standard way, that is, 
> fork (clone) and execve system calls. The process name on task struct 
> is set by the putname() on the sys_execve syscall handler. 
>
> But when I run a Android application such the Calculator, for example, 
> i found 6 new tasks (processes or threads) forked by zygote. In fact, 
> zygote forks just one process and this new process spawns 4 new 
> processes and set their names using set_task_comm() and the last one 
> forks an aditional process. And at the last set_task_comm() is called 
> for the first forked process from zygote. 
>
> So there are two ways for set the task->comm field for a process: The 
> standard way (using execve and putname()) and a new way used by 
> Android using sys_prctl who calls set_task_comm(). 
>
> Does anyone have more information on how processes are created on 
> Android and why a App needs all theis tasks forked by zygote? Why 
> execve is not used and what is used instead? 
>
> I m using Android for Mips using the Arriba QEMU emulator as my 
> experimentation platform. 
>
> Thanks, 
>
> -- 
> unsubscribe: android-kernel+unsubscr...@googlegroups.com 
> website: http://groups.google.com/group/android-kernel

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to