易截截图软件、单文件、免安装、纯绿色、仅160KB

linux kernel thread

http://hi.baidu.com/j_fo/blog/item/55f4014f1a226937aec3ab01.html
Linux Kernel Thread 的讨论
2007-05-14 11:45
kernel thread

Gearheads Written by Sreekrishnan Venkateswaran
   Thursday, 15 September 2005

Threads are programming abstractions used in concurrent processing. A kernel thread is a way to implement background tasks
inside the kernel. A background task can be busy handling asynchronous
events or can be asleep, waiting for an event to occur. Kernel threads
are similar to user processes, except that they live in kernel space
and have access to kernel functions and data structures. Like user
processes, kernel threads appear to monopolize the processor because of
preemptive scheduling.
In
this month’s “Gearheads,” let’s discuss kernel threads and develop an
example that also demonstrates such as process states, wait queues, and
user-mode helpers.
Built-in Kernel Threads
To
see the kernel threads (also called kernel processes) running on your
system, run the command ps –ef. You should see something similar to
Figure One.
FIGURE ONE: A typical list of Linux kernel threads
$ ps
–ef
UID       
PID
PPID
C STIME TTY         
TIME CMD
root        
1    
0
0 22:36 ?       
00:00:00 init [3]
root        
2    
1
0 22:36 ?       
00:00:00 [ksoftirqd/0]
root        
3    
1
0 22:36 ?       
00:00:00 [events/0]
root       
38    
3
0 22:36 ?       
00:00:00 [pdflush]
r


相关文档:

linux ip命令

ip 是个命令, ip 命令的功能很多!基本上它整合了 ifconfig 与 route 这两个命令,不过ip 的功能更强大! 如果您有兴趣的话,请自行 vi /sbin/ifup 就知道整个 ifup 就是利用 ip 这个命令来实现的。下面介绍一下使用方法
[root@linux ~]# ip [option] [动作] [命令]
参数:
option :设定的参数,主要有:
   ......

linux启动过程

linux启动流程:
系统预处理程序->GRUB  (此阶段可以理解为bootloader阶段)
->kernel   (此阶段为kernel)
->initrd->init启动->inittab->rc.sysinit->functions(PATH)->modules->rcX.d(读配置文件)
1.->字符模式->tty->bash
2.->图形模式->进入X Window-> ......

Linux中正确处理errno

errno变量(需include errno.h)会被赋一个整数值,不同的值表示不同的含义,
可以通过查看该值推测出错的原因。但是errno是一个数字,代表的具体含义
还要到errno.h中去阅读宏定义。有下面几种方法可以方便的得到错误信息
(一)
#include <stdio.h>
void perror(const char *s)
perror()用来将上一个函数发生错误的 ......

linux 递归查找文件内容

递归查找文件内容:
grep   -n   -ri   "slewing"   ./
在当前目下递归查找所有的文件
       -i, --ignore-case
              Ignore  case  distinctions  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号