首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > OpenSolaris邮件列表中关于进程数据结构的讨论
【标  题】:OpenSolaris邮件列表中关于进程数据结构的讨论
【关键字】:OpenSolaris
【来  源】:http://blog.chinaunix.net/article.php?articleId=34166&blogId=768

OpenSolaris邮件列表中关于进程数据结构的讨论

转载自:OpenSolaris: code



Matt -

Looks like a cool idea. For basic information on processes, check out:

usr/src/uts/common/sys/proc.h

This give you a 'proc_t', the basic type for processes. Each process
has any number of threads (kthread_t) associated it. And each thread
may or may not have an lwp associated with it (klwp_t). Kernel threads
do not have an associated lwp, while userland processes do.

A single threaded program will appear as a proc_t with a single thread i
'p_tlist'. A multithreaded program will still be a single process, but
have multiple threads in 'p_tlist'. The proc_t serves as a single point
for process control, as well as process-wide information common to all
threads.

The 'libproc' library in userland is an entirely different beast, and is
a layered control library built on top of /proc. See
http://www.opensolaris.org/os/community/observability/process/libproc/
for more info.

The best way to learn this stuff is a combination of 'mdb -k' and
DTrace. Try "::walk proc", "::walk thread", or "::pgrep bash | ::walk
thread", and "::print" is your friend.

On Fri, Jun 24, 2005 at 11:18:43AM -0700, Matthew Melton wrote:
> I'm trying to write a Wiki detailing OpenSolaris. I would appreciate help with this, after all, Wikis are a community effort!
>
> The wiki, for now, is located here: http://kernelbits.org/OSWiki
>
> At present, the only thing i've focused on are threads, as Solaris threads are rather interesting (well, brilliant imo).
>
> http://kernelbits.org/OSWiki/doku.php?id=threads
>
> I have a question about processes! I don't quite understand where processes are defined in the source. As I see it, a process is just an abstraction of a thread - that is, a single threaded program is the same as a single thread in the kernel. Therefore, a process is merely the enforcement of restraints on a thread. However, I cannot see where the process enforcements come in.
>
> There is a userspace process library, but I cannot see anything else in kernel land!?!
>
> Im also completely bamboozed about the number of queue types too. Buts thats another issue.
>
> If anyone could offer an explaination, please do so here, or on the wiki! :D
>
> Matt


OpenSolaris邮件列表中关于虚拟内存管理学习的讨论:【上一篇】
Linux启动过程综述 zt:【下一篇】
【相关文章】
  • OpenSolaris邮件列表中关于虚拟内存管理学习的讨论
  • OpenSolaris邮件列表中关于x86引导程序的讨论
  • OpenSolaris邮件列表中关于HAT layer(硬件地址转换层)的讨论
  • OpenSolaris邮件列表中关于malloc实现的讨论
  • OpenSolaris邮件列表中关于系统调用的讨论
  • OpenSolaris邮件列表中关于ACPI的讨论
  • OpenSolaris邮件列表中关于学习memory segmentation和paging的讨论
  • OpenSolaris的精神本质
  • OpenSolaris邮件列表中关于proc文件系统的讨论
  • OpenSolaris邮件列表中关于进程管理子系统的讨论
  • 【随机文章】
  • firebird database (快速入門)[转载]
  • 《合金装备》系列六年
  • mysql5存储过程编写实践
  • CDMA2000 1X演进方案
  • ASP教程:第六篇 ASP脚本循环语句
  • 发布NBearV3正式版
  • Linux入门命令
  • Fireworks圆角矩形之深入探索
  • SilkPerformer的十一宗罪(上)
  • VC++技术内幕(第四版)读书笔记之Windows的编程模式
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.