Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 Õ¾µã2

2¡£ ¼¼ÊõÍøµã£º
csdn.net
chinaunix.net
ibm.com/developerworks/cn/linux
LinuxÄÚ´æÊ¹ÓÃÏê½â£º
http://blog.chinaunix.net/u2/67750/showart_2154542.html
3¡£ Linux¼¼Êõµã
ϵͳ¹ÜÀíÃüÁî(expect.)
shell±à³Ì
ÕýÔò±í´ïʽ
busybox
Îļþϵͳ
4¡£ ÆäËü¼¼Êõµã
pclint£¨¾²Ì¬´úÂë¼ì²é¹¤¾ß£©
source monitor ......

Linuxϵͳ°²×°Ö®Ò»: Ó²Å̰²×°Ubuntu 8.04

 È«ÎÄÃèÊöÁË´Ówindowx xpϵͳÖУ¬Í¨¹ýÓ²ÅÌÖдæÔÚµÄubuntuµÄiso°²×°Îļþ£¬ Òýµ¼ÏµÍ³Íê³ÉLinuxµÄ°²×°¡£
Ô­Àí£º ÉèÖÃϵͳµÄÆô¶¯·½Ê½£¬Í¨¹ýÐÞ¸Äboot.iniÎļþ£¬ÀûÓÃgrub for dos Òýµ¼ÏµÍ³´ÓisoÆô¶¯£¬´Ó¶øË³ÀûÆô¶¯UbuntuµÄ°²×°¡£
 (×¢Ò⣺Ubuntu isoÎļþ¿ÉÒÔ²»Óð²×°£¬Ö±½ÓʹÓá£Ï൱ÓÚLive CDÒ»Ñù£¬ Ö»ÊÇ´¦ÀíµÄ½á¹û² ......

linuxµÄchmodÓëchownÃüÁîÏê½â


inuxµÄchmodÃüÁîʹÓÃÏê½â
ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸´æÈ¡È¨ÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓàchmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËù´æÈ¡¡£
mode : È¨ÏÞÉ趨×Ö´® ......

Linux Kernel API (2.6)

#protect share data
spin_lock/spin_unlock: protect the data during process context(and only at process context), and make sure your code bewteen lock/unlock is fast enough.There may deadlock if the same spin_lock is called at interrupt context.
spin_lock_irq/spin_unlock_irq: call it during interru ......

Linux»·¾³½ø³Ì¼äͨÐÅ


Linux»·¾³½ø³Ì¼äͨÐÅ£¨Ò»£©
¹ÜµÀ¼°ÓÐÃû¹ÜµÀ
Ö£ÑåÐË (mlinux@163.com)¹ú·À¿Æ´ó¼ÆËã»úѧԺ
2002 Äê 12 ÔÂ 11 ÈÕ
ÔÚ±¾ÏµÁÐÐòÖÐ×÷Õ߸ÅÊöÁË linux ½ø³Ì¼äͨÐŵļ¸ÖÖÖ÷ÒªÊֶΡ£ÆäÖйܵÀºÍÓÐÃû¹ÜµÀÊÇ×îÔçµÄ½ø³Ì¼äͨÐÅ»úÖÆÖ®Ò»£¬¹ÜµÀ¿ÉÓÃÓÚ¾ßÓÐÇ×Ôµ¹ØÏµ½ø³Ì¼äµÄͨÐÅ£¬ÓÐÃû¹ÜµÀ¿Ë·þÁ˹ܵÀûÓÐÃû×ÖµÄÏÞÖÆ£¬Òò´Ë£¬³ý¾ßÓйܵ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ