On 10/12/09 22:27, Javen Wu wrote:
Hi Buddies,
I have a question about solaris boot strap main() function.
solaris create fsflush/pageout in main function by newproc() as sys
class kernel process and use kernel address space?
Yes. pageout has priority 99 and fsflush has priority 60. Both processes
have p->p_as = &kas.
Is there any special reason we cannot implement fsflush(pid 2) and
pageout daemon(pid3) by thread_create() as a kernel thread directly?
thread_create() is a common interface both for kernel thread(SYS) and
for other threads (such as TS), an arg to this function is to specify
the associated process to the creating thread. We usually create kernel
thread by specifying the associated process as p0, since we don't need
pid for kernel thread.
while for pageout and fsflush, I guess it is a unix tradition that they
have pid 3 and 2(and maybe some scripts use them), so we need create
separate proc_t first by getproc() to get a pid, and then create address
space(though kas), then lwp, eventually thread_create() to create the
real schedule unit.
-Brian
If the driver-discuss is not the appropriate alias to ask the
question, which aliase should be better to get my question answered?
Thanks
--
Javen Wu
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss