- 论坛徽章:
- 2
|
原帖由 assiss 于 2006-9-6 16:41 发表
时间啊时间,莫向NETBSD学习,只在用户级实现THREAD,要向FREEBSD学习,在内核级实现。
老人家说过,时间就如同那啥里的水,只要你“愿意”(内核级的)去挤,总是有的。
kern/kern_kthread.c 不是内核线程吗?看说明应该是吧:em11:
/*
* Fork a kernel thread. Any process can request this to be done.
* The VM space and limits, etc. will be shared with proc0.
*/
int
kthread_create1(void (*func)(void *), void *arg,
struct proc **newpp, const char *fmt, ...)
...
这几个守护线程也是这样生成的。
(init_main.c)
if (kthread_create1(uvm_pageout, NULL, NULL, "pagedaemon" )
panic("fork pagedaemon" ;
/* Create the filesystem syncer kernel thread. */
if (kthread_create1(sched_sync, NULL, NULL, "ioflush" )
panic("fork syncer" ;
/* Create the aiodone daemon kernel thread. */
if (kthread_create1(uvm_aiodone_daemon, NULL, &uvm.aiodoned_proc,
"aiodoned" )
panic("fork aiodoned" ;
我对scheduler activations老建立不起来细节概念,还望as兄指教 |
|