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

Linux的工作队列

1,先看看工作队列和tasklet的区别:
    (1) 定时器和tasklet:
    Tasklets resemble kernel timers in 3 ways.
      1)They are always run at interrupt time,
      2)they always run on the same CPU that schedules them,
      3)and they receive an unsigned long argument.   Unlike kernel timers, however, you can’t ask to execute the function at a specific time.
     (2) tasklet和工作队列:
     Workqueues are, superficially, similar to tasklets; they allow kernel code to request that a function be called at some future time. There are, however, some significant differences between the two, including:
        1) Tasklets run in software interrupt context with the result that all tasklet code must be atomic. Instead, workqueue functions run in the context of a special kernel process; as a result, they have more flexibility. In particular, workqueue functions can sleep.
        2)Tasklets always run on the processor from which they were originally submitted. Workqueues work in the same way, by default.
        3)Kernel code can request that the execution of workqueue functions be delayed for an explicit interval.
2,工作队列(work queue)是Linux kernel中将工作推后执行的一种机制。这种机制和BH或Tasklets不同之处在于工作队列是把推后的工作交由一个内核线程去执行,因此工作队列的优势就在于它允许重新调度甚至睡眠。工作队列是2.6内核开始引入的机制,在2.6.20之后,工作队列的数据结构发生了一些变化,因此本文分成两个部分对2.6.20之前和之后的版本分别做介绍。
    (1)2.6.0~2.6.19
数据结构:
struct work_struct {
    unsigned long pending;
    struct list_head entry;
    void (*func)(void *);
    void *data


相关文档:

linux和windows文件名长度限制

Linux文件名的长度限制是255个字符
windows下完全限定文件名必须少于260个字符,目录名必须小于248个字符。
linux下文件数、目录数、文件名长度的各种限制
以下测试都是在没有优化或修改内核的前提下测试的结果
1. 测试目的:ext3文件系统下filename最大字符长度
  测试平台:RHEL5U3_x64
  测试过程:
L ......

Linux SSH 中文乱码解决方法

现象:用SSH软件连接时,中文是乱码
解决:
修改/etc/sysconfig/i18n文件,将其改成以下内容:
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16" ......

如何保障Linux用户安全

Linux应用范围的日益扩展,使得其使用性越来越受到关注。性是一个复杂和广泛的问题,此处我们主要关注Linux用户的账户安全,特别是Linux系统管理员如何保障用户的安全。
  
  
  口令安全
  
  
  Linux系统中的/etc/passwd文件含有全部系统需要知道的每个用户的信息(加密口令的密文也可能存于/etc/ ......

Moto Linux应用开发(六):USB连接共享PC上网

由于在开发A1200上的流媒体播放器,免不了长期播放视频,进行稳定性测试。开始是通过GPRS拨号上网,但播放视频太费流量了,充个50元,都顶不住一天的测试。看到window mobile的手机都可以通过PC上网,因此想到moto linux手机也可以共享PC上网,节省流量费用。从理论上将是可行的,因为moto手机可以开启USB LAN,通过USB连接 ......

Ubuntu Linux系统环境变量配置文件介绍


Ubuntu Linux系统环境变量配置文件介绍
 
发布时间:2007.12.19 06:30     来源:赛迪网    作者:sixth
在Ubuntu中有如下几个文件可以设置环境变量
 
/etc/profile:在登录时,操作系统定制用户环境时使用的第一个文件,此文件为系统的每个用户设置环境信息,当用 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号