OpenSolaris邮件列表中关于进程管理子系统的讨论

发表于:2007-06-08来源:作者:点击数: 标签:
转载自: OpenSolaris: code Process Management Subsystem saravn02 Hi, I would like to know whats the logical order to be studied in the codeto know all about process management, lwp's, kernel threads and stuff.. Also i would like to know the

转载自: OpenSolaris: code

Process Management Subsystem

saravn02        

Hi,
I would like to know whats the logical order to be studied in the code to know all about process management, lwp's, kernel threads and stuff..
Also i would like to know the scheduling aspect as well.
Help is appreciated.
Thanks
Jay

eschrock     

On Tue, Jul 12, 2005 at 09:20:16AM -0700, Saravanan Jayakumar wrote:
> Hi,
> I would like to know whats the logical order to be studied in the code to know all about process management, lwp's, kernel threads and stuff..
> Also i would like to know the scheduling aspect as well.
> Help is appreciated.
> Thanks
> Jay

The best high-level discussion is found in Jim Mauro and Rich
McDougall's book "Solaris Internals" (http://www.solarisinternals.com).
Though slightly out of date (they are working on a 2nd edition), the
kernel abstractions are the same.

To get started in the code, check out the files 'proc.h', 'thread.h' and
'klwp.h' in usr/src/uts/common/sys. A process (proc_t) is a collection
of threads (kthread_t), and each thread may or may not have an lwp
(klwp_t) attached. All userland threads have an associated LWP; kernel
threads do not. The userland implementation has gone through several
iterations over the past few releases, but is now a 1-to-1 mapping
between kernel threads and userland LWPs.

For scheduling, check out 'usr/src/uts/common/disp/disp.c', which is the
heart of the dispatcher, reponsible for thread scheduling.

Hope that helps. We could probably do with an "understanding the
Solaris process model" somewhere on opensolaris.org, but AFAIK such a
doc has yet to be written.

- Eric

--
Eric Schrock, Solaris Kernel Development.
_______________________________________________
opensolaris-code mailing list
opensolaris-code at opensolaris dot org
https://opensolaris.org:444/mailman/listinfo/opensolaris-code


原文转自:http://www.ltesting.net