Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÈíÖжϻúÖÆ


 
 
linuxÈíÖжϻúÖÆ
 
 
ÖжϷþÎñ³ÌÐòÍùÍù¶¼ÊÇÔÚCPU¹ØÖжϵÄÌõ¼þÏÂÖ´Ðеģ¬ÒÔ±ÜÃâÖжÏǶÌ׶øʹ¿ØÖƸ´ÔÓ»¯¡£µ«ÊÇCPU¹ØÖжϵÄʱ¼ä²»ÄÜÌ«³¤£¬·ñÔòÈÝÒ׶ªÊ§ÖжÏÐźš£Îª´Ë£¬ Linux½«ÖжϷþÎñ³ÌÐòÒ»·ÖΪ¶þ£¬¸÷³Æ×÷“Top Half”ºÍ“Bottom Half”¡£Ç°Õßͨ³£¶Ôʱ¼äÒªÇó½ÏΪÑϸñ£¬±ØÐëÔÚÖжÏÇëÇó·¢ÉúºóÁ¢¼´»òÖÁÉÙÔÚÒ»¶¨µÄʱ¼äÏÞÖÆÄÚÍê³É¡£Òò´ËΪÁ˱£Ö¤ÕâÖÖ´¦ÀíÄÜÔ­×ÓµØÍê³É£¬Top Halfͨ³£ÊÇÔÚCPU¹ØÖжϵÄÌõ¼þÏÂÖ´Ðеġ£¾ßÌåµØ˵£¬Top HalfµÄ·¶Î§°üÀ¨£º´ÓÔÚIDTÖеǼǵÄÖжÏÈë¿Úº¯ÊýÒ»Ö±µ½Çý¶¯³ÌÐò×¢²áÔÚÖжϷþÎñ¶ÓÁÐÖеÄISR¡£¶øBottom HalfÔòÊÇTop Half¸ù¾ÝÐèÒªÀ´µ÷¶ÈÖ´Ðеģ¬ÕâЩ²Ù×÷ÔÊÐíÑÓ³Ùµ½ÉÔºóÖ´ÐУ¬ËüµÄʱ¼äÒªÇó²¢²»Ñϸñ£¬Òò´ËËüͨ³£ÊÇÔÚCPU¿ªÖжϵÄÌõ¼þÏÂÖ´Ðеġ£
µ«ÊÇ£¬ LinuxµÄÕâÖÖBottom Half£¨ÒÔϼò³ÆBH£©»úÖÆÓÐÁ½¸öȱµã£¬Ò²¼´£º£¨1£©ÔÚÈÎÒâһʱ¿Ì£¬ÏµÍ³Ö»ÄÜÓÐÒ»¸öCPU¿ÉÒÔÖ´ÐÐBottom Half´úÂ룬ÒÔ·ÀÖ¹Á½¸ö»ò¶à¸öCPUͬʱÀ´Ö´ÐÐBottom Halfº¯Êý¶øÏ໥¸ÉÈÅ¡£Òò´ËBH´úÂëµÄÖ´ÐÐÊÇÑϸñ“´®Ðл¯”µÄ¡££¨2£©BHº¯Êý²»ÔÊÐíǶÌס£
ÕâÁ½¸öȱµãÔÚµ¥CPUϵͳÖÐÊÇÎ޹ؽôÒªµÄ£¬µ«ÔÚSMPϵͳÖÐÈ´ÊǷdz£ÖÂÃüµÄ¡£ÒòΪBH»úÖƵÄÑϸñ´®Ðл¯Ö´ÐÐÏÔȻûÓгä·ÖÀûÓÃSMPϵͳµÄ¶àCPUÌص㡣Ϊ´Ë£¬Linux2.4ÄÚºËÔÚBH»úÖƵĻù´¡ÉϽøÐÐÁËÀ©Õ¹£¬Õâ¾ÍÊÇËùνµÄ“ÈíÖжÏÇëÇ󔣨softirq£©»úÖÆ¡£
Linux µÄsoftirq»úÖÆÊÇÓëSMP½ôÃܲ»¿É·ÖµÄ¡£Îª´Ë£¬Õû¸ösoftirq»úÖƵÄÉè¼ÆÓëʵÏÖÖÐ×Ôʼ×ÔÖÕ¶¼¹á³¹ÁËÒ»¸ö˼Ï룺“Ë­´¥·¢£¬Ë­Ö´ÐД£¨Who marks£¬Who runs£©£¬Ò²¼´´¥·¢ÈíÖжϵÄÄǸöCPU¸ºÔðÖ´ÐÐËüËù´¥·¢µÄÈíÖжϣ¬¶øÇÒÿ¸öCPU¶¼ÓÉËü×Ô¼ºµÄÈíÖжϴ¥·¢Óë¿ØÖÆ»úÖÆ¡£Õâ¸öÉè¼Æ˼ÏëҲʹµÃsoftirq »úÖƳä·ÖÀûÓÃÁËSMPϵͳµÄÐÔÄܺÍÌص㡣
LinuxÔÚinclude/linux/interrupt.hÍ·ÎļþÖж¨ÒåÁËÊý¾Ý½á¹¹softirq_action£¬À´ÃèÊöÒ»¸öÈíÖжÏÇëÇó£¬ÈçÏÂËùʾ£º
/* softirq mask and active fields moved to irq_cpustat_t in
* asm/hardirq.h to get better cache usage. KAO
*/
struct softirq_action
{
void (*action)(struct softirq_action *);
void *data;
}
ÆäÖУ¬º¯ÊýÖ¸ÕëactionÖ¸ÏòÈíÖжÏÇëÇóµÄ·þÎñº¯Êý£¬¶øÖ¸ÕëdataÔòÖ¸ÏòÓÉ·þÎñº¯Êý×ÔÐнâÊ͵ÄÊý¾Ý¡£
»ùÓÚÉÏÊöÈíÖжÏÃèÊö·û£¬LinuxÔÚkernel/softirq.cÎļþÖж¨ÒåÁËÒ»¸öÈ«¾ÖµÄsoftirq_vec[32]Êý×飺
static struct softirq_action softirq_vec[32] __cachel


Ïà¹ØÎĵµ£º

LinuxÇý¶¯µÄÅäÖúͱàÒë½Å±¾

  ÔÚÍê³ÉÁËÇý¶¯³ÌÐò´úÂëµÄ±àд֮ºó£¬½ÓÏÂÀ´µÄÈÎÎñ¾ÍÊDZàÒë¡£linuxÄں˱àÒëµÄ¹ý³ÌÊÇͨ¹ýÄÚºËÔ´ÂëµÄ¸ùĿ¼ºÍ¸÷×ÓĿ¼ÖеÄMakefile·Ö¼¶¹ÜÀíµÄ¡£ÆäÖиùĿ¼µÄMakefileÊÇ×îÖØÒªµÄ£¬Ëü¿ÉÒÔ¿´³ÉÊÇÆäËûMakefile×î³õµÄÈë¿Ú¡£Ëü¸ºÔð¶¨ÒåËùÓÐÓëÌåϵ½á¹¹Î޹صıäÁ¿ºÍÄ¿±ê£¬¶ÁÈ¡.configÎļþ£¬²¢¸ù¾ÝÆäÐÅÏ¢×îÖÕÉú³Évmlinux(elf¸ñʽµÄ ......

ÎÒµÄÐéÄâÎļþϵͳ£¨linux)


 
1# ·¢±íÓÚ 2005-11-15 17:34  Ö»¿´¸Ã×÷Õß
  http://www.chinaunix.net ×÷Õß:bierdaci  ·¢±íÓÚ£º2004-05-25 18:59:33
²»ÖªµÀ¸Ã²»¸Ã·¢ÕâÀÊÇÎÒ´Óproc¸ÄÀ´µÄ,¶®ÄÚºËÔ´ÂëµÄ½»Á÷½»Á÷
hello.c
[code:1:3adb123188]
#include "hello.h"
struct inode * hello_get_inode(struct s ......

Linux×ÀÃæÈçºÎ²ÅÄÜ×ß³öÀ§¾³£¿


 
 
    ÔÚÌÖÂÛÕâ¸öÎÊÌâ֮ǰ£¬ÎÒÃÇÏÈÀ´¿´¿´Linux×ÀÃæÓöµ½ÁËʲôÀ§ÄÑ¡£
    Ä¿Ç°£¬LinuxÔÚ×ÀÃæÉϵÄÊг¡Õ¼ÓÐÂʾÝÓйط½Ãæ¹À¼ÆÔÚ1%×óÓÒ£¬Õâ¸ö±ÈÀýÉõÖÁ»¹²»ÈçAppleµÄMac OS X£¬È˼ҵÄÊг¡Õ¼ÓÐÂÊÒ²ÓÐ4%ÒÔÉÏ¡£¸ü±ðÌáMS Windows°Ù·ÖÖ®¾ÅÊ®ÒÔÉϵÄÊг¡Õ¼ÓÐÂÊ£¬¿ÉÒÔ˵Linux×ÀÃæËƺõ¿ÉÒÔ ......

ÔÚlinuxÏ°²×°Óöµ½µÄ»·¾³±äÁ¿ÎÊÌâ

 ½ñÌìÔÚ°²×°oracle¹ý³ÌÖУ¬²ÎÕÕÍøÉÏÏÂÔصÄ×ÊÁÏÔÚRHEL5ÉÏ°²×°oracle£¬Õû¸ö¹ý³Ì±È½Ï˳Àû£¬µ«ÊÇÈ´Óöµ½ÁËÒ»µãÎÊÌ⣬ËäÈ»²»ÊǺÜÑÏÖØ£¬µ«ÊDZϾ¹ÊǸöÎÊÌâÐÄÀﻹÊDz»ºÜÊæ·þ£¬ÔÚ´ËÇë·¹ýµÄ½â¾ö¡£
      Ö÷ÒªÎÊÌâÊÇoracleÓû§µÄ»·¾³±äÁ¿£¬ÔÚ°²×°oracle¹ý³ÌÖУ¬ÓÐÒ»²½ÊÇÐèÒªÒÔoracleÓû§µÇ¼£¬È»ºó±à¼­ ......

linuxѹËõÃüÁî tar

root@linux ~]# tar [-cxtzjvfpPN] ÎļþÓëĿ¼ ....
²ÎÊý£º
-c £º½¨Á¢Ò»¸öѹËõÎļþµÄ²ÎÊýÖ¸Áî(create µÄÒâ˼)£»
-x £º½â¿ªÒ»¸öѹËõÎļþµÄ²ÎÊýÖ¸Á
-t £º²é¿´ tarfile ÀïÃæµÄÎļþ£¡
Ìرð×¢Ò⣬ÔÚ²ÎÊýµÄÏ´ïÖУ¬ c/x/t ½öÄÜ´æÔÚÒ»¸ö£¡²»¿Éͬʱ´æÔÚ£¡
ÒòΪ²»¿ÉÄÜͬʱѹËõÓë½âѹËõ¡£
-z £ºÊÇ·ñͬʱ¾ßÓÐ gzip µÄÊôÐÔ£¿Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ