linux µ÷¶ÈÆ÷·¢Õ¹¼òÊö
·¢²¼µÄ 2.6.23 ÄÚºËÖаüº¬ÁËÒ»¸öÖØÒªµÄ±ä»¯£¬ÓÃCFSÌæ´úÁËÒÔÇ°µÄµ÷¶ÈÆ÷¡£CFS ±»ºÏ²¢µ½ mainline ֮ǰ£¬¹ØÓÚÄں˵÷¶ÈÆ÷»¹ÓÐÒ»¸öÖØÒªµÄ patch£ºRSDL¡£×îÖÕ 2.6.23 ¾ö¶¨½« CFS ºÏ²¢µ½ mainline ¶ø·ÅÆúÁË RSDL¡£ÎªÊ²Ã´ÒªÒýÈëеĵ÷¶ÈÆ÷£¬CFS ºÍ RSDL ÓÐʲôÁªÏµºÍÇø±ð£¿±¾ÎÄÊÔͼ¶ÔÄں˵÷¶ÈËã·¨µÄ·¢Õ¹ÀúÊ·×öÒ»¸ö¼òÒª½éÉÜ£¬Ï£ÍûÄܶÔÉÏÊöÎÊÌâµÄÀí½âÓÐËù°ïÖú¡£
ÒýÑÔ
½ø³Ìµ÷¶ÈÊDzÙ×÷ϵͳµÄºËÐŦÄÜ¡£µ÷¶ÈÆ÷Ö»ÊÇÊǵ÷¶È¹ý³ÌÖеÄÒ»²¿·Ö£¬½ø³Ìµ÷¶ÈÊǷdz£¸´ÔӵĹý³Ì£¬ÐèÒª¶à¸öϵͳÐͬ¹¤×÷Íê³É¡£±¾ÎÄËù¹Ø×¢µÄ½öΪµ÷¶ÈÆ÷£¬ËüµÄÖ÷Òª¹¤×÷ÊÇÔÚËùÓÐ RUNNING ½ø³ÌÖÐÑ¡Ôñ×îºÏÊʵÄÒ»¸ö¡£×÷Ϊһ¸öͨÓòÙ×÷ϵͳ£¬Linux µ÷¶ÈÆ÷½«½ø³Ì·ÖΪÈýÀࣺ
½»»¥Ê½½ø³Ì
´ËÀà½ø³ÌÓдóÁ¿µÄÈË»ú½»»¥£¬Òò´Ë½ø³Ì²»¶ÏµØ´¦ÓÚ˯Ãß״̬£¬µÈ´ýÓû§ÊäÈë¡£µäÐ͵ÄÓ¦ÓñÈÈç±à¼Æ÷ vi¡£´ËÀà½ø³Ì¶ÔϵͳÏìӦʱ¼äÒªÇó±È½Ï¸ß£¬·ñÔòÓû§»á¸Ð¾õϵͳ·´Ó¦³Ù»º¡£
Åú´¦Àí½ø³Ì
´ËÀà½ø³Ì²»ÐèÒªÈË»ú½»»¥£¬ÔÚºǫ́ÔËÐУ¬ÐèÒªÕ¼ÓôóÁ¿µÄϵͳ×ÊÔ´¡£µ«ÊÇÄܹ»ÈÌÊÜÏìÓ¦ÑÓ³Ù¡£±ÈÈç±àÒëÆ÷¡£
ʵʱ½ø³Ì
ʵʱ¶Ôµ÷¶ÈÑÓ³ÙµÄÒªÇó×î¸ß£¬ÕâЩ½ø³ÌÍùÍùÖ´Ðзdz£ÖØÒªµÄ²Ù×÷£¬ÒªÇóÁ¢¼´ÏìÓ¦²¢Ö´ÐС£±ÈÈçÊÓƵ²¥·ÅÈí¼þ»ò·É»ú·ÉÐпØÖÆϵͳ£¬ºÜÃ÷ÏÔÕâÀà³ÌÐò²»ÄÜÈÝÈ̳¤Ê±¼äµÄµ÷¶ÈÑÓ³Ù£¬ÇáÔòÓ°ÏìµçÓ°·ÅӳЧ¹û£¬ÖØÔò»ú»ÙÈËÍö¡£
¸ù¾Ý½ø³ÌµÄ²»Í¬·ÖÀà Linux ²ÉÓò»Í¬µÄµ÷¶È²ßÂÔ¡£¶ÔÓÚʵʱ½ø³Ì£¬²ÉÓà FIFO »òÕß Round Robin µÄµ÷¶È²ßÂÔ¡£¶ÔÓÚÆÕͨ½ø³Ì£¬ÔòÐèÒªÇø·Ö½»»¥Ê½ºÍÅú´¦ÀíʽµÄ²»Í¬¡£´«Í³ Linux µ÷¶ÈÆ÷Ìá¸ß½»»¥Ê½Ó¦ÓõÄÓÅÏȼ¶£¬Ê¹µÃËüÃÇÄܸü¿ìµØ±»µ÷¶È¡£¶ø CFS ºÍ RSDL µÈеĵ÷¶ÈÆ÷µÄºËÐÄ˼ÏëÊÇ“ÍêÈ«¹«Æ½”¡£Õâ¸öÉè¼ÆÀíÄî²»½ö´ó´ó¼ò»¯Á˵÷¶ÈÆ÷µÄ´úÂ븴ÔӶȣ¬»¹¶Ô¸÷ÖÖµ÷¶ÈÐèÇóµÄÌṩÁ˸üÍêÃÀµÄÖ§³Ö¡£
ÔÚ̽ÌÖCFSºÍRSDL֮ǰ£¬ÎÒÃÇÊ×ÏȻعËÒ»ÏÂLinux2.4ºÍLinux2.6.0ÖÐËùʹÓõĵ÷¶ÈÆ÷¡£
Äں˵÷¶ÈÆ÷µÄ¼òµ¥ÀúÊ·
2.1 Linux2.4 µÄµ÷¶ÈÆ÷
Linux2.4.18 ÖÐʹÓõĵ÷¶ÈÆ÷²ÉÓûùÓÚÓÅÏȼ¶µÄÉè¼Æ£¬Õâ¸öµ÷¶ÈÆ÷ºÍ Linus ÔÚ 1992 Äê·¢²¼µÄµ÷¶ÈÆ÷ûÓдóµÄÇø±ð¡£¸Ãµ÷¶ÈÆ÷µÄ pick next Ëã·¨·Ç³£¼òµ¥£º¶Ô runqueue ÖÐËùÓнø³ÌµÄÓÅÏȼ¶½øÐÐÒÀ´Î½øÐбȽϣ¬Ñ¡Ôñ×î¸ßÓÅÏȼ¶µÄ½ø³Ì×÷ΪÏÂÒ»¸ö±»µ÷¶ÈµÄ½ø³Ì¡£(Runqueue ÊÇ Linux ÄÚºËÖб£´æËùÓоÍÐ÷½ø³ÌµÄ¶ÓÁÐ) ¡£ÊõÓï pick next ÓÃÀ´Ö¸´ÓËùÓкòÑ¡½ø³ÌÖÐÌôÑ¡ÏÂÒ»¸öÒª±»µ÷¶ÈµÄ½ø³ÌµÄ¹ý³Ì¡£
ÿ¸ö½ø³Ì±»´´½¨Ê±¶¼±»¸³ÓèÒ»¸öʱ¼äƬ¡£Ê±ÖÓÖжϵݼõµ±Ç°ÔËÐнø³ÌµÄʱ¼äƬ£¬µ±½ø³ÌµÄʱ¼äƬ±»ÓÃÍêʱ£¬Ëü±ØÐëµÈ´ýÖ
Ïà¹ØÎĵµ£º
ÐèÒªÏÈ°²×°libxml2-devel libxslt-develÕâÁ½¸örpm°ü£¬Èç¹ûʹÓ÷ÇrootÓû§°²×°£¬¿ÉÒÔÏÂÔØlibxml2ºÍlibxsltµÄÔ´´úÂë½øÐа²×°¡£ libxml2-devel¡¢libxslt-devel×°ºÃºó£¬½âѹlxmlµÄ°ü£¬Çл»µ½Õâ¸ö°üµÄ·¾¶¡£
¼ÓÈëCFLAGS½øÐбàÒëºÍ°²×°£¬ÔÚshellÏÂÒÀ´ÎÊäÈëÈçÏÂÃüÁ CFLAGS=-I/usr/include/libxml2:/usr/include/libxslt/ ......
0.11ºËÖнø³ÌµÄµ÷¶ÈÖ÷ÒªÓÉËĸö²¿·ÖÊý×é³É£ºµ÷¶È³õʼ»¯¡¢µ÷¶È¡¢Ë¯Ãß¡¢»½ÐÑ¡£
Ò»¡¢µ÷¶È³õʼ»¯:sched_init()
ÎÒÃÇÖªµÀÔÚÄں˳õʼ»¯£¨main£©¹ý³ÌÖУ¬Òª½«ÈÎÎñ0ת»»µ½Óû§Ì¬ÏÂÖ´ÐУ¬Ò²¾ÍÊǽ¨Á¢LinuxÖеĵÚÒ»¸öÓû§³ÌÐò¡£¼ÈÈ»ÈÎÎñ0֮ǰÊÇÔÚÄÚºË̬ÏÂÖ´Ðе ......
ÏÈÊÇÄÚºËÇý¶¯³ÌÐò£º
#include <linux/module.h>//¾ßÌåµÄÍ·ÎļþλÖÃΪ/opt/FriendlyARM/mini2440/linux-2.6.29/include/linux/*.h
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <l ......
Ç°¶Îʱ¼ä°Ý¶Áfudan_abcµÄÎÄÕºó¸ù¾Ý×Ô¼ºµÄÀí½âдµÄһЩ·ÖÎö
[url=http://blog.chinaunix.net/u1/57901/showart.php?id=1855876][color=#02368d][size=10pt]LINUXÏÂUSB1.1É豸ѧϰС¼Ç(1) [/size][/color]
[url=http://blog.chinaunix.net/u1/57901/showart.php?id=1856447][color=#02368d][size=10pt]LINUXÏÂUSB1. ......
ÉùÃ÷
£º¿ÉÒÔ×ÔÓÉתÔر¾ÎÄ£¬µ«ÇëÎñ±Ø±£Áô±¾ÎĵÄÍêÕûÐÔ¡£
×÷Õß
£ºÕÅ×Ó¼á
email
:zhangzijian@163.com
˵Ã÷
£º±¾ÎÄËùÉ漰ʾÀý¾ùÔÚfedora core3ϵõ½¡£
--------------------------------------------------------------------------------
/proc
ÎļþϵͳϵĶàÖÖÎļþÌṩµÄϵͳÐÅÏ¢²»ÊÇÕë¶Ôij¸öÌض¨½ø³ÌµÄ£¬¶øÊÇÄ ......