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

linux tasklet 4

引用 2 楼 cokeliu 的回复:
谢谢! 请问是否每调用一次tasklet_schedule(B task); B task任务被加到链表上只会被执行一次?
是的,只被加一次
第一次tasklet_schedule(B task)给他一个状态TASK_STATE_SCHED
作标记,以后的tasklet_schedule(B task)会检查这个标记
http://os.inf.tu-dresden.de/l4env/doc/html/dde_linux/group__mod__softirq.html
Deferred Activities
[Linux DDE Common
]
This module emulates deferred activities
at interrupt level inside the Linux kernel.
More...
Softirqs
This is from include/linux/interrupt.h
Softirqs are multithreaded, not serialized BH-like activities. Several
softirqs may run on several CPUs simultaneously - no matter if they are
of the same type.
Properties:
If raise_softirq()
is called, then softirq is guarenteed to be executed on this CPU.
On schedule()
do_softirq() is called if any softirq is active on this CPU.
Softirqs are not serialized in any way.
Linux (2.4.20) has only 4 softirqs:
HI_SOFTIRQ

NET_TX_SOFTIRQ
and NET_RX_SOFTIRQ

TASKLET_SOFTIRQ

Relevant for Linux DDE are for now only the first and the latter - NET_*
softirqs allow transparent mutli-threading in Linux' network code. HI_SOFTIRQ
is for high priority bottom halves as old-style
BHs and sound related drivers. It triggers execution of tasklet_hi_action()
. TASKLET_SOFTIRQ
runs lower priority bottom halves (e.g. in the console subsystem). It triggers execution of tasklet_action()
.
Todo:
only the implementation of tasklets is done in Linux DDE
void 
raise_softirq
(int nr)
 
Raise Softirq.
Tasklets
This is from kernel/softirq.c and include/linux/interrupt.h)
Tasklets are the multithreaded analogue of BHs.
Main feature differing them of generic softirqs: one tasklet is running only on one CPU simultaneously.
Main feature differing them of BHs: different tasklets may be run simultaneously on different CPUs.
Properties:
If tasklet_schedule()
is called, then tasklet is guaranteed to be executed on some cpu at least on


相关文档:

linux 常用命令

目录和文件操作
查看当前目录相对于根目录的位置
 
  pwd
查看当前目录内容
  ls
以长格式查看当前目录内容。对应每个文件的条目将包括连接数目、所有者、大小、最后修改时间、权限等内容
  ls -l
改变当前目录。目的目录名可用相对路径表示,也可以用绝对路径表示。
cd [目的目录名]
转移到上一级目录
c ......

linux内核源码中常见宏定义

1. gcc的__attribute__编绎属性
要了解Linux Kernel代码的分段信息,需要了解一下gcc的__attribute__的编绎属性,__attribute__主要用于改变所声明或定义的函数或数据的特性,它有很多子项,用于改变作用对象的特性。比如对函数,noline将禁止进行内联扩展、noreturn表示没有返回值、pure表明函数除返回值外,不会通过其它 ......

linux启动过程

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

LINUX下的iptables

原帖:http://www.cnscn.org/read.php?tid-44684.html
iptables有三种链
1:INPUT (进来的链)
2:OUTPUT(出去的链)
3:FORWARD(转发的链)
iptables -A INPUT -p icmp -j DROP
-A(添加一个链) -p 协议 -j(添加动作) 说明添加一个进来的链。协议是icmp动作拒绝。
iptables -L -n (用树形结构来看一下iptables的设置)
......

新手看招:xManager连接Linux的配置方法


第一步,我们在Linux系统下,修改/etc/X11/xdm/Xaccess文件,找到下面的语句:
# * #any host can get a login window
 
去掉最前面的#号,成为
* #any host can get a login window
 
第二步,我们修改/etc/X11/gdm/gdm.conf文件,找到下面的语句:
 
[xdmcp]
Enable=false
将其中的En ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号