תÔØ linux 2.6Äں˽ø³Ì¹ÜÀí
linux 2.6Äں˽ø³Ì¹ÜÀí
linuxÿ¸ö½ø³Ì¶ÔÓ¦Ò»¸ötask_structÀàÐͽṹ¡£¸Ã½á¹¹°üº¬½ø³ÌÏà¹ØµÄËùÓÐÐÅÏ¢¡£linux½ø³Ìͨ¹ýlist_head×é֯˫ÏòÁ´±í£¬Ã¿Ò»¸ö½áµã¾ÍÊÇÒ»¸ö½ø³ÌÃèÊö·û¡£½ø³ÌÃèÊö·ûÀïÃæ°üº¬Á˽ø³ÌËùÓеÄÐÅÏ¢£º½ø³ÌËù´ò¿ªµÄÎļþ¡¢½ø³ÌµÄµØÖ·¿Õ¼ä¡¢¹ÒÆðÐźš¢½ø³Ì״̬ºÍÆäËû¸ü¶àµÄÐÅÏ¢¡£ÒÔÏÂÊǽø³ÌÃèÊö·ûµÄ²¿·Ö¶¨Ò壺
shruct task_struct
{
unsigned long state; //½ø³ÌµÄ״̬£¬ÔÚ2.6.23ÒѾÓÐ9¸ö״̬
unsigned long policy; //ÃèÊö½ø³Ìµ÷¶È²ßÂÔ.ÅжÏÊÇʵʱ½ø³Ì»¹ÊÇ·Çʵʱ½ø³Ì
struct task_struct *parent; //×éÖ¯½ø³ÌµÄ²ã´Î¹Øϵ£¬Ö¸Ïò¸¸½ø³Ì
struct list_head tasks; //ͨ¹ýlist_head×éÖ¯³ÉË«ÏòÁ´±í
pid_t pid; //ÿ¸ö½ø³ÌΨһµÄ±êºÅ
......
};
½ø³ÌÃèÊö·ûÀïÃæÓÐÒ»¸öpid£¬Ëü¾ÍÊǽø³Ì¼äÇø±ð±êÖ¾¡£Ëüʵ¼ÊÉÏÊÇÒ»¸ö¶ÌÕûÐÍÊý¾Ý£¬Ò²¾ÍÊÇ˵Ëü×î´óֵΪ32767¡£
linuxͨ¹ýslab·ÖÅäÆ÷·ÖÅätask-struct½á¹¹¡£ÕâÑùÄÜ×öµ½¶ÔÏó¸´Ó㬼õÉÙ¶¯Ì¬·ÖÅäºÍÊÍ·Å´øÀ´µÄ×ÊÔ´ÏûºÄ¡£
linux ͨ¹ýcurrentºê²éÕÒµ±Ç°ÕýÔÚÔËÐеĽø³ÌÃèÊö·û¡£²»Í¬µÄÓ²¼þÌåϵ£¬ÓеÄÓ²¼þÄóöרÃŵļĴæÆ÷´æ·Åµ±Ç°½ø³Ì¡£X86ÔÚÄÚºËÕ»µÄβ¶Ë´´½¨thread_info½á¹¹£¬¸Ã½á¹¹ÖÐtaskÓòÖ¸Ïò¸Ã¸ÃÈÎÎñtask_struct¡£Í¨¹ý¼ÆËãÆ«ÒƼÆËã³öµ±Ç°µÄ½ø³Ì¡£
currentºê²Î¿¼£ºhttp://blog.chinaunix.net/u1/55599/showart_1080763.html
linux½ø³ÌµÄ״̬£º
·ÔËÐУ¨TASK_RUNNING£©:
¾ÍÐ÷״̬(Ö¸½ø³ÌËæʱ¿ÉÒÔͶÈëÔËÐÐ) ÔËÐÐ״̬(Ö¸½ø³ÌÕýÔÚÔËÐÐ)¡£
×¢£ºlinuxûÓоÍÐ÷¶ÓÁУ¬ÒѾÍÐ÷½ø³ÌºÍµ±Ç°ÕýÔÚÔËÐеĽø³Ìstate¶¼ÎªTASK_RUNNING
·¿ÉÖжϣ¨TASK_INTERUPTIBLE£©:
¸Ã״̬µÄ½ø³ÌÄ
Ïà¹ØÎĵµ£º
»·¾³Èí¼þ°æ±¾½éÉÜ£º
APACHE 2.0.59
PHP5.2.3
MYSQL5.0.45
GD-2.0.35
Zend Optimizer v3.3.0
  ......
ÎÒ¶ÔÄÚÈÝ×ö³ö²¿·Öµ÷Õû¡£
ǰЩÌìÓÐÈË·¢ÌûÎÊÈç¹ûÔÚ linux ÏÂÓà eclipse ¿ª·¢
C/C++£¬ËùÒÔÎÒ¾ÍÏëдÕâôһƪÌû×Ó£¬ÒòΪһֱÔÚÓà Eclipse ×ö JAVA
¿ª·¢£¬¶ÔEclipse±È½ÏÊìϤ£¬°²×°²å¼þµ±È»Ò²²»³ÉÎÊÌâ¡£ÎÞÒâÖÐÔÚÍøÉÏ¿´µ½ÕâƪÌû×Ó£¬¾õµÃдµÄºÜÏêϸ£¬ÎÒÒ²¾Í¾õµÃ×Ô¼ºÃ»ÓбØÒªÔÙÔÚÕâÉÏÃæÀË· ......
ÒÔÏÂÊdz£ÓõÄÃüÁîÓëÓ÷¨£º
ÔÚʹÓùý³ÌÖÐËæʱÌí¼Ó¡£¡£¡£
1.ÔÝʱÒÔ root Éí·ÝÔËÐÐÃüÁ sudo
2.½âѹËõ .rar Îļþµ½µ±Ç°Îļþ¼Ð£º rar e file_name.rar
3.ÔÚlinux Ï´ò¿ªchm ¸ñʽÎļþ£º
KchmViewer
¿ÉÔÚ£¬ubuntu ÏÂÖ±½ÓÓà ³ÌÐò¹ÜÀíÆ÷ °²×°......
4.
ÉèÖÃrootÕÊ» ......
ÕâЩ¶¼ÊǵäÐ͵ÄʹÓÃGNUµÄAUTOCONFºÍAUTOMAKE²úÉúµÄ³ÌÐòµÄ°²×°²½Öè¡£
./configureÊÇÓÃÀ´¼ì²âÄãµÄ°²×°Æ½Ì¨µÄÄ¿±êÌØÕ÷µÄ¡£±ÈÈçËü»á¼ì²âÄãÊDz»ÊÇÓÐCC»òGCC£¬²¢²»ÊÇÐèÒªCC»òGCC£¬ËüÊǸöshell½Å±¾
makeÊÇÓÃÀ´±àÒëµÄ£¬Ëü´ÓMakefileÖжÁÈ¡Ö¸ÁȻºó±àÒë¡£
make installÊÇÓÃÀ´°²×°µÄ£¬ËüÒ²´ÓMakefileÖжÁÈ¡Ö¸Á°²×°µ½Ö¸¶¨µÄÎ»Ö ......
ÎÄÕÂÀ´Ô´£º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 ½á¹¹Ò ......