Chinaunix

标题: 有个比较弱的问题。。NetBSD进程调度的代码在哪个文件里面? [打印本页]

作者: _z_    时间: 2006-02-13 09:58
标题: 有个比较弱的问题。。NetBSD进程调度的代码在哪个文件里面?
FreeBSD的在sched_4bsd.c和sched_ule.c里面
NetBSD的在哪个文件里?找了一圈没找到。。
作者: _z_    时间: 2006-02-13 10:19
找到了。在kern_sa.c。。

有个叫sa的东西,不知道作啥的。学习一下
作者: 雨丝风片    时间: 2006-02-13 10:25
原帖由 _z_ 于 2006-2-13 10:19 发表
找到了。在kern_sa.c。。

有个叫sa的东西,不知道作啥的。学习一下



应该是Scheduler Activations的意思吧,
作者: _z_    时间: 2006-02-13 10:49
原帖由 雨丝风片 于 2006-2-13 10:25 发表



应该是Scheduler Activations的意思吧,


嗯,搜了点资料。是这个意思。

NetBSD的多线程是M:N的关系,引入了Virtual Processor这个东东。
看起来比较牛X,学习ing。。
作者: gvim    时间: 2006-02-13 11:17
http://www.mit.edu/people/nathan ... -sa/freenix-sa.html
作者: 雨丝风片    时间: 2006-02-13 11:24
原帖由 gvim 于 2006-2-13 11:17 发表
http://www.mit.edu/people/nathan ... -sa/freenix-sa.html


好东西!
作者: gvim    时间: 2006-02-13 11:25
原帖由 雨丝风片 于 2006-2-13 11:24 发表


好东西!


其实,一搜就出来了
作者: _z_    时间: 2006-02-13 11:38
原帖由 gvim 于 2006-2-13 11:17 发表
http://www.mit.edu/people/nathan ... -sa/freenix-sa.html


好银啊
作者: MichaelBibby    时间: 2006-02-13 13:32
能不能把NetBSD的中文locale支持给完善一下啊?
作者: mingyanguo    时间: 2006-02-13 17:00
原帖由 _z_ 于 2006-2-13 10:49 发表


嗯,搜了点资料。是这个意思。

NetBSD的多线程是M:N的关系,引入了Virtual Processor这个东东。
看起来比较牛X,学习ing。。

跟FreeBSD的那个模型一样么?看上去很相似。
作者: 雨丝风片    时间: 2006-02-13 17:20
原帖由 mingyanguo 于 2006-2-13 17:00 发表

跟FreeBSD的那个模型一样么?看上去很相似。


疑似!

FreeBSD KSE Project

Overview
Kernel Scheduler Entities (KSE), is a kernel-supported threading system similar in design to Scheduler Activations [Anderson, et. al.]. It strikes a balance between user-level (1:N) and kernel-level (1:1) threading models, giving most of the advantages of both, and few of the disadvantages of either.

There are two halves of this project: kernel support and user support. The kernel support consists of modifications to the FreeBSD scheduler; The user half is a POSIX® threads implementation which takes advantage of the extra facilities the kernel provides.

The goal is to replace the current user threading system provided by the libc_r library, and the -pthread gcc option, with a new libpthread library which will be linked with the -lpthread gcc option.

Using KSE
All KSE development is being done in 5.0-CURRENT. No special kernel configuration options are required to build a kernel with the KSE-related changes (the changes are inextricable from the FreeBSD scheduler).

In order to use KSE in an application, you need to link it against libpthread; this is straightforward. In the application's makefile(s), change the -pthread compiler switch or -lc_r link option to -lpthread and relink. Alternatively, you can use /etc/libmap.conf to map libc_r to libpthread (see libmap.conf(5)).
作者: xie_minix    时间: 2006-02-15 00:28
/usr/src/sys/kern/kern_synch.c
作者: bitripper    时间: 2006-02-15 03:28
kern_switch.c
作者: 雨丝风片    时间: 2006-02-15 07:44
原帖由 xie_minix 于 2006-2-15 00:28 发表
/usr/src/sys/kern/kern_synch.c


老大,难得看到你露面,以后要常来指导工作啊!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2