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

LinuxÄÚ´æ¹ÜÀíÖ®slab·ÖÅäÆ÷·ÖÎö(ÐøÎå)

 ¾Å£º¼¸µã²¹³ä£º
1: SlabÖÐʹÓõÄÒ³Ã涼»á¼ÓÉÏ“PG_slab”±êÖ¾£¬ÒÔ¸úÒ»°ãµÄÒ³ÃæÇø±ð¡£ÁíÍ⣬ÔÚÊÍ·ÅÄÚ´æµÄʱºò£¬¾­³£ÐèÒªÓõ½´ÓÒ³Ãæµ½slabµÄ¶ÔӦת»»¹Øϵ¡£ÄÇÊÇÔõÑù±êʶµÄÄØ£¿
¹ØÓÚ±êÖ¾£º
×¢ÒâÓÐÒÔÏ´úÂ룺
static void *kmem_getpages(kmem_cache_t *cachep, int flags, int nodeid)
{
     ……
     while (i--) {
         //Ϊ·ÖµÃµÄÿһ¸öÒ³ÃæÉèÖÃPG_slab±êÖ¾
         SetPageSlab(page);
         page++;
     }
……
}
¹ØÓÚ´ÓÒ³Ãæµ½slabµÄת»»£º
  Ïò»ï°éϵͳÇëÇóÄÚ´æ
static int cache_grow (kmem_cache_t * cachep, int flags)
{
     ……
     //ÇëÇóÄÚ´æ¹ýºó£¬ÉèÖÃÄÚ´æÊôÐÔ
set_slab_attr(cachep, slabp, objp);
……
}
static void set_slab_attr(kmem_cache_t *cachep, struct slab *slabp, void *objp)
{
     int i;
     struct page *page;
     //¼ÆËãÒ³Ãæ×ÜÊý
     i = 1 << cachep->gfporder;
     //ÐéÄâµØַת»»³ÉÏàÓ¦Ò³Ãæ
     page = virt_to_page(objp);
     do {
         // #define    SET_PAGE_CACHE(pg,x)  ((pg)->lru.next = (struct list_head *)(x))
         SET_PAGE_CACHE(page, cachep);
         #define  SET_PAGE_SLAB(pg,x)   ((pg)->lru.prev = (struct list_head *)(x))
         SET_PAGE_SLAB(page, slabp);
         page++;
     } while (--i);
}
´ÓÉÏÃæµÄº¯


Ïà¹ØÎĵµ£º

LinuxϵͳÏÂʹÓÃUSBת´®¿ÚÁ¬½Ó¹¤ÒµÉ豸

 
LinuxϵͳÏÂʹÓÃUSBת´®¿ÚÁ¬½Ó¹¤ÒµÉ豸 ÔÚWindowsÏ¿ÉÒÔʹÓ󬼶ÖÕ¶ËÀ´Á¬½Ó½»»»»úºÍ·ÓÉÆ÷µÈ¹¤ÒµÉ豸£¬¶øÇÒÔÚWindowsÏÂʹÓÃusbת´®¿ÚµÄÏßÒ²ÓÐÏàÓ¦µÄÇý¶¯£¬µ«ÊÇÈçºÎÔÚLinuxÏÂʹÓÃÄØ£¿
¡¡¡¡Ê×ÏÈÒªÓÐÒ»¸öLinuxϵÄÖÕ¶ËÈí¼þ½ÐminicomÈç¹ûûÓÐ×°Õâ¸öµÄÅóÓÑ¿ÉÒÔµ½×Ô¼ºµÄÔ´ÖÐÈ¥ÏÂÔØ£¬È»ºóÄã¾ÍÒª²åÉÏÄãµÄusbת´®¿ÚµÄÏߣ¬ÔÚ ......

Linux Shell

 ShellÊÇϵͳµÄÓû§½çÃ棬ÌṩÁËÓû§ÓëÄں˽øÐн»»¥²Ù×÷µÄÒ»ÖÖ½Ó¿Ú¡£Ëü½ÓÊÕÓû§ÊäÈëµÄÃüÁî²¢°ÑËüËÍÈëÄÚºËÈ¥Ö´ÐС£
¡¡¡¡Êµ¼ÊÉÏShellÊÇÒ»¸öÃüÁî½âÊÍÆ÷£¬Ëü½âÊÍÓÉÓû§ÊäÈëµÄÃüÁî²¢ÇÒ°ÑËüÃÇË͵½Äںˡ£²»½öÈç´Ë£¬ShellÓÐ×Ô¼ºµÄ±à³ÌÓïÑÔÓÃÓÚ¶ÔÃüÁîµÄ±à¼­£¬ËüÔÊÐíÓû§±àдÓÉshellÃüÁî×é³ÉµÄ³ÌÐò¡£Shell±à³ÌÓïÑÔ¾ßÓÐÆÕͨ±à³ÌÓ ......

ÈçºÎ³ÉΪһ¸öLinuxϵͳÄں˿ª·¢Õß

¡¡¡¡ÄãÏë³ÉÖªµÀÈçºÎ³ÉΪһ¸öLinuxÄں˿ª·¢Õßô£¿»òÕßÄãµÄÀÏ°å¸æËßÄ㣬“ȥΪÕâ¸öÉ豸дһ¸öLinuxÇý¶¯¡£“ÕâƪÎĵµµÄÄ¿µÄ£¬¾ÍÊÇͨ¹ýÃèÊöÄãÐèÒª¾­ÀúµÄ¹ý³ÌºÍÌáʾÄãÈçºÎºÍÉçÇøÒ»Æð¹¤×÷£¬À´½Ì¸øÄãΪ´ïµ½ÕâЩĿµÄËùÐèÒªÖªµÀµÄËùÓÐ֪ʶ¡£±¾ÎÄÒ²³¢ÊÔ½âÊÍÉçÇøΪʲôÕâÑù¹¤×÷µÄһЩԭÒò¡£
¡¡¡¡Äں˼¸ºõÈ«ÊÇÓÃCд³ÉµÄ£¬ÓÐ ......

linuxÖÐELF¼ÓÔعý³Ì·ÖÎö

sys_execve
   | - do_execve
|
| - search_binary_handler         
           |- linux_binfmt= elf_format
       |- elf_format-> load_elf_binary
| -&nbs ......

»Ø¹Ë£º¶«¾©LinuxÄں˴ó»áºÏÓ°£¬NoÅ®ÐÔ

 ÕâÊdzöϯÔÚ2009Äê10ÔÂ20ÈÕÔÚ¶«¾©¾ÙÐеÄLinuxÄں˴ó»áºÏÓ°ÕÕ¡£È«·Ö±æÂÊÕÕƬ¡£Ò»¸öÅ®ÐÔ¶¼Ã»ÓС£ÄãÈÏʶÆäÖеļ¸Î»ÄØ£¿
ÒÔÏÂÊdzöϯ»áÒéµÄÃûµ¥£¬ÓÐÐËȤµÄÅóÓÑ¿ÉÒÔ¶ÔÒ»¶Ô£º
Al Viro
Alan Cox
Andi Kleen
Andrew Morton
Andy Whitcroft
Arjan van de Ven
Arnd Bergmann
Avi Kivity
Benjamin Herrenschmidt
Brian ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ