Linux 2.6 µ÷¶Èϵͳ·ÖÎö
ÎÄÕÂÀ´Ô´£ºhttp://www.ibm.com/developerworks/cn/linux/kernel/l-kn26sch/index.html
¼¶±ð£º ³õ¼¶
ÑîɳÖÞ (pubb@163.net), ¹ú·À¿Æ¼¼´óѧ¼ÆËã»úѧԺ, 2004 Äê 4 ÔÂ
2004 Äê 4 ÔÂ 01 ÈÕ
±¾ÎÄ´Ó Linux 2.4 µ÷¶ÈϵͳµÄȱÏÝÈëÊÖ£¬Ïêϸ·ÖÎöÁË Linux 2.6 µ÷¶ÈϵͳµÄÔÀíºÍʵÏÖϸ½Ú£¬²¢¶ÔÓëµ÷¶ÈϵͳÏà¹ØµÄ¸ºÔØƽºâ¡¢NUMA ½á¹¹ÒÔ¼°ÊµÊ±ÐÔÄܽøÐÐÁË·ÖÎöºÍÆÀ¼Û¡£ÎÄÄ©£¬×÷Õß´Óµ÷¶ÈϵͳµÄ·¢Õ¹ºÍʵÏÖ³ö·¢£¬¶Ô Linux µÄ·¢Õ¹ÌصãºÍ·½ÏòÌá³öÁË×Ô¼ºµÄ¿´·¨¡£
1£® Ç°ÑÔ
Linux µÄÊг¡·Ç³£¹ãÀ«£¬´Ó×ÀÃ湤×÷Õ¾µ½µÍ¶Ë·þÎñÆ÷£¬Ëü¶¼ÊÇÈκÎÉÌÓòÙ×÷ϵͳµÄÓÐÁ¦¾ºÕù¶ÔÊÖ¡£Ä¿Ç°£¬Linux ÕýÈ«Á¦½ø¾üǶÈëʽϵͳºÍ¸ß¶Ë·þÎñÆ÷ϵͳÁìÓò£¬µ«ËüµÄ¼¼ÊõȱÏÝÏÞÖÆÁËËüµÄ¾ºÕùÁ¦£ºÈ±·¦¶ÔʵʱÈÎÎñµÄÖ§³Ö£¬¶à´¦Àí»ú¿ÉÀ©Õ¹ÐԲÔÚ 2.4 ÄÚºËÖУ¬Ôì³ÉÕâÁ½¸öÈõÏîµÄ¹Ø¼üÔÒòÖ®Ò»¾ÍÊǵ÷¶ÈÆ÷Éè¼ÆÉϵÄȱÏÝ¡£
2.6 µ÷¶Èϵͳ´ÓÉè¼ÆÖ®³õ¾Í°Ñ¿ª·¢Öصã·ÅÔÚ¸üºÃÂú×ãʵʱÐԺͶദÀí»ú²¢ÐÐÐÔÉÏ£¬²¢ÇÒ»ù±¾ÊµÏÖÁËËüµÄÉè¼ÆÄ¿±ê¡£Ö÷ÒªÉè¼ÆÕߣ¬´«ÆæʽÈËÎï Ingo Molnar ½«Ðµ÷¶ÈϵͳµÄÌØÐÔ¸ÅÀ¨ÎªÈçϼ¸µã£º
¼Ì³ÐºÍ·¢Ñï 2.4 °æµ÷¶ÈÆ÷µÄÌص㣺
½»»¥Ê½×÷ÒµÓÅÏÈ
ÇáÔØÌõ¼þϵ÷¶È/»½ÐѵĸßÐÔÄÜ
¹«Æ½¹²Ïí
»ùÓÚÓÅÏȼ¶µ÷¶È
¸ß CPU ʹÓÃÂÊ
SMP ¸ßЧÇ׺Í
ʵʱµ÷¶ÈºÍ cpu °ó¶¨µÈµ÷¶ÈÊÖ¶Î
ÔÚ´Ë»ù´¡Ö®ÉϵÄÐÂÌØÐÔ£º
O(1)µ÷¶ÈËã·¨£¬µ÷¶ÈÆ÷¿ªÏúºã¶¨£¨Ó뵱ǰϵͳ¸ºÔØÎ޹أ©£¬ÊµÊ±ÐÔÄܸüºÃ
¸ß¿ÉÀ©Õ¹ÐÔ£¬ËøÁ£¶È´ó·ù¶È¼õС
ÐÂÉè¼ÆµÄ SMP Ç׺ͷ½·¨
ÓÅ»¯¼ÆËãÃܼ¯Ð͵ÄÅú´¦Àí×÷ÒµµÄµ÷¶È
ÖØÔØÌõ¼þϵ÷¶ÈÆ÷¹¤×÷¸üƽ»¬
×Ó½ø³ÌÏÈÓÚ¸¸½ø³ÌÔËÐеÈÆäËû¸Ä½ø
ÔÚ 2.5.x µÄÊÔÑé°æ±¾ÖУ¬Ðµĵ÷¶ÈÆ÷µÄ¿ª·¢Ò»Ö±Êܵ½¹ã·º¹Ø×¢£¬Êµ²âÖ¤Ã÷ËüµÄȷʹϵͳÐÔÄܵõ½ºÜ´ó¸ÄÉÆ¡£±¾ÎľʹÓÐÂÉè¼ÆµÄÊý¾Ý½á¹¹¿ªÊ¼£¬Î§ÈÆ 2.6 ¶ÔÓÚ 2.4 Ëù×÷µÄ¸Ä½ø£¬¶Ô 2.6 µ÷¶ÈϵͳµÄÔÀíºÍʵÏÖϸ½Ú½øÐзÖÎö¡£2.6 µ÷¶ÈÆ÷Éè¼ÆÏ൱¸´ÔÓ£¬ÎÄÖл¹´æÔںܶàÐèÒª¼ÌÐøÑо¿µÄµØ·½£¬ÌرðÊǸ÷¸öµ÷¶È²ÎÊýµÄÉ趨£¬ËæןËÐÄ°æ±¾µÄÉý¼¶£¬¿ÉÄÜ»¹»á¼ÌÐøÐÞÕý¡£
2£® еÄÊý¾Ý½á¹¹ runqueue
ÎÒÃÇÖªµÀ£¬ÔÚ 2.4 ÄÚºËÖУ¬¾ÍÐ÷½ø³Ì¶ÓÁÐÊÇÒ»¸öÈ«¾ÖÊý¾Ý½á¹¹£¬µ÷¶ÈÆ÷¶ÔËüµÄËùÓвÙ×÷¶¼»áÒòÈ«¾Ö×ÔÐýËø¶øµ¼ÖÂϵͳ¸÷¸ö´¦Àí»úÖ®¼äµÄµÈ´ý£¬Ê¹µÃ¾ÍÐ÷¶ÓÁгÉΪһ¸öÃ÷ÏÔµÄÆ¿¾±¡£
2.4 µÄ¾ÍÐ÷¶ÓÁÐÊÇÒ»¸ö¼òµ¥µÄÒÔ runqueue_head ΪͷµÄË«ÏòÁ´±í£¬ÔÚ 2.6 ÖУ¬¾ÍÐ÷¶ÓÁж¨ÒåΪһ¸ö¸´ÔӵöàµÄÊý¾Ý½á¹¹ struct runqueue£¬²¢ÇÒ£¬ÓÈΪ¹Ø¼üµÄÊÇ£¬Ã¿Ò»¸ö CPU ¶¼½«Î¬»¤Ò»¸ö×Ô¼ºµÄ¾ÍÐ÷¶ÓÁУ¬--Õ⽫´ó´ó¼õС¾ºÕù¡
Ïà¹ØÎĵµ£º
дÕâƪblog²ÎÕÕÁËO'Reilly µÄ¡¶Understanding the Linux Kernel¡·£¬»òÕß˵ÊǴ󲿷ֲÎÕÕ£¬Êµ¼ÊÉÏÕâ±¾Êé¹ØÓÚÕâÕÂдµÃȷʵºÜ¾µä¡£¾¡¹ÜÈç´Ë£¬ÔÚ¿´´úÂëµÄ¹ý³ÌÖÐÎÒÈÔÈ»Óöµ½Á˺ܶàÀ§»ó£¬ÒÔÖÁÓÚ¿´¹ýÁ½±éÖ®ºóÄÔ×ÓÀﻹÊÇһ͎¬ºý¡£ËùÒÔ»¹µÃ¸Ðл´åÒ¯°ïÎÒÀíÇå³þÁË˼·£¬²»¸Òµ¡Âý£¬¸Ï½ôдÏÂÀ´·ÀÖ¹Íü¼Ç¡£(ÒÔÏ´úÂë¼°½âÊ;ùÒÔ2.4.18°æ±¾Îª ......
×÷ΪһÃûÍøÂç¹ÜÀíÔ±£¬ÄúÐèҪΪÄúËùÐè¹ÜÀíµÄÿ¸öÍøÂçÉ豸´æ·ÅÓÃÓÚ¹ÜÀíµÄÓû§ÐÅÏ¢¡£µ«ÊÇÍøÂçÉ豸ͨ³£Ö»Ö§³ÖÓÐÏÞµÄÓû§¹ÜÀí¹¦ÄÜ¡£Ñ§Ï°ÈçºÎʹÓà Linux™ ÉϵÄÒ»¸öÍⲿ RADIUS ·þÎñÆ÷À´ÑéÖ¤Óû§£¬¾ßÌåÀ´ËµÊÇͨ¹ýÒ»¸ö LDAP ·þÎñÆ÷½øÐÐÑéÖ¤£¬¿ÉÒÔ¼¯ÖзÅÖô洢ÔÚ LDAP ·þÎñÆ÷Éϲ¢ÇÒÓÉ RADIUS ·þÎñÆ÷½øÐÐÑéÖ¤µÄÓû§ÐÅÏ¢£¬´Ó¶ø¼È ......
Ëæ×ÅLinuxµÄÓ¦ÓÃÈÕÒæ¹ã·º£¬ÌرðÊÇÔÚÍøÂçÓ¦Ó÷½Ã棬ÓдóÁ¿µÄÍøÂç·þÎñÆ÷ʹÓÃLinux²Ù×÷ϵͳ¡£ÓÉÓÚLinuxµÄ×ÀÃæÓ¦ÓúÍWindowsÏà±È»¹ÓÐÒ»¶¨µÄ²î¾à£¬ËùÒÔÔÚÆóÒµÓ¦ÓÃÖÐÍùÍùÊÇLinuxºÍWindows²Ù×÷ϵͳ¹²´æÐγÉÒì¹¹ÍøÂç¡£ÔÚ·þÎñÆ÷¶Ë´ó¶àʹÓÃLinuxºÍUnixµÄ£¬Ä¿Ç°LinuxµÄÉó¤Ó¦ÓÃÁìÓòÊǵ¥Ò»Ó¦ÓõĻù´¡·þÎñÆ÷Ó¦Óã¬Æ©ÈçDNSºÍDHCP·þÎñÆ÷¡¢W ......
×÷Õߣº²ÜÖÒÃ÷,»ªÇåÔ¶¼ûǶÈëʽѧԺ½²Ê¦¡£
PCIÊÇÍâΧÉ豸»¥ÁªµÄ¼ò³Æ(Peripheral Component Interconnect)µÄ¼ò³Æ£¬×÷ΪһÖÖͨÓõÄ×ÜÏß½Ó¿Ú±ê×¼£¬ËûÔÚ¼ÆËã»úϵͳÖеõ½Á˹㷺µÄʹÓá£PCIµÄËÙ¶ÈÄܹ»´ïµ½132M/s¡£ÔÚÕâÀï¼òµ¥µÄ½éÉÜһϠlinux ÏÂPCIÇý¶¯µÄʵÏÖ¡£
ÔÚ±àдһ¸öPCIÇý¶¯µÄʱºòÎÒÃÇÏȵÃÈ·¶¨ÏµÍ³ÖÐÊÇ·ñÓÐÎÒÃǵÄÉ豸¡£Î ......
FTP> ! ´Ó ftp ×ÓϵͳÍ˳öµ½Íâ¿Ç¡£
¡¡¡¡FTP> ? ÏÔʾ ftp ÃüÁî˵Ã÷¡£? Óë help Ïàͬ¡£
¡¡¡¡¸ñʽ£º? [command]
¡¡¡¡ËµÃ÷£º[command]Ö¸¶¨ÐèÒª°ïÖúµÄÃüÁîÃû³Æ¡£Èç¹ûûÓÐÖ¸¶¨ command£¬ftp ½«ÏÔʾȫ²¿ÃüÁîµÄÁÐ±í¡£
¡¡¡¡FTP> append ʹÓõ±Ç°ÎļþÀàÐÍÉèÖý«±¾µØÎļþ¸½¼Óµ½Ô¶³Ì¼ÆËã»úÉϵÄÎļþ¡£
¡¡¡¡¸ñʽ£ºappend ......