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

linux 2.6Ô´´úÂëÇé¾°·ÖÎö±Ê¼ÇÖ®ÄÚ´æ5

ÔÚÄÚ´æÆô¶¯×ʼʱ£¬biosµÄÆðÖ÷µ¼×÷Óã¬ÄÚºËͨ¹ýËüÀ´Á˽âÎïÀíÄÚ´æµÄÇé¿ö¡£Í¬Ê±µ÷ÓÃbios¹ý³Ì½¨Á¢Ò»×éÎïÀíµØÖ··¶Î§ºÍÆä¶ÔÓ¦µÄÄÚ´æÀàÐÍ¡£
ͨ¹ýº¯Êýmachine_specific_memory_setup()º¯ÊýÀ´½¨Á¢ÎïÀíµØÖ·Ó³Éä¡£´Ë±í¿ÉÒÔ»ñÈ¡£¬ÊÇÄÚºËÔÚbiosÁбíµÄ»ù´¡ÉϹ¹½¨µÄ£»·ñÔòÄں˰´ÕÕ±£ÊصÄȱʡÉèÖù¹½¨ÕâÕÅ±í£º´Ó0x9f£¨lowmemsize()£©µ½0x100(high_memory)ºÅµÄËùÓÐÒ³¿ò¶¼±ê¼ÇΪ±£Áô¡£setup_memoryº¯Êý¹¹¼ÜÕâÕÅ±í¡£
static unsigned long __init setup_memory(void)
{
        unsigned long bootmap_size, start_pfn, max_low_pfn;
        start_pfn = PFN_UP(init_pg_tables_end);
        find_max_pfn();
        max_low_pfn = find_max_low_pfn();
        bootmap_size = init_bootmem(start_pfn, max_low_pfn);
        register_bootmem_low_pages(max_low_pfn);
        reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY));
        reserve_bootmem(0, PAGE_SIZE);´Ëº¯ÊýÓÃÀ´±£ÁôÒ³Ã棬·½·¨Êǽ«±£Áôλ±ä³É1.
        reserve_ebda_region();
        if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && boot_cpu_data.x86 == 6)
             reserve_bootmem(0xa0000 - 4096, 4096);
        return max_low_pfn;
}
º¯Êý¾­¹ý¼ò»¯±ä³É×î»ù±¾µÄÐÎ̬¡£
ÆäÖУ¬ul·Ö±ðÊÇbootmap_size£¨bit mapµÄsize£©,start_pfn(¿ªÊ¼µÄÒ³¿ò)£¬max_low_pfn(±»ÄÚºËÖ±½ÓÓ³ÉäµÄ×îºóÒ»¸öÒ³¿òµÄÒ³¿òºÅ) ;
#define PFN_UP(x)       (((x) + PAGE_SIZE - 1) >> PAGE_SHIFT);
unsigned long init_pg_tables_end __initdata = ~0UL
Èý¸öÏà¹ØµÄºê£º
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
#define PFN_PHYS(x


Ïà¹ØÎĵµ£º

ѧϰLinuxϵͳµÄʮһµã½¨Òé

ѧϰLinuxϵͳµÄʮһµã½¨Òé
2007.06.12     À´×Ô£ºlingfen1552.cublog.c¡¡         [Êղص½ÎÒµÄÍøÕª]
Ëæ×ÅLinuxÓ¦ÓõÄÀ©Õ¹Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥Linux£¬¸ù¾ÝѧϰWindwosµÄ¾­ÑéÍùÍùÓÐһЩãȻµÄ¸Ð¾õ£º²»Öª´ÓºÎ´¦¿ªÊ¼Ñ§Æð¡£ÈçºÎµÃµ½Áª»ú°ïÖúºÍ˽ÓвÙ×÷ϵͳ²»Í¬£¬¸÷¸öLinuxµÄ·¢Ðа汾µÄ¼¼ÊõÖ§³ÖÊ ......

Linux²Ù×÷ϵͳµÄÍ·ÎļþºÍ¿âÎļþËÑË÷·¾¶

Ò»¡¢ Í·Îļþ 1 ¡°¡±ÖеÄÍ·Îļþ£¬ÔÚÔ´Îļþµ±Ç°Ä¿Â¼²éÕÒ 2 -I ÖÐÖ¸¶¨Ä¿Â¼ 3 gccµÄ»·¾³±äÁ¿ C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, OBJC_INCLUDE_PATH 4 ±àÒëÆ÷Ô¤Éè·¾¶¡¢ÄÚ¶¨Ä¿Â¼£º /usr/include /usr/local/include /usr/lib/gcc-lib/i386-linux/2.95.2/include /usr/lib/gcc-lib/i386-linux/2.95.2/../../../.. ......

¼àÊÓLinuxϵͳ¸ºÔØ×´¿öµÄ¼¸¸ö¹¤¾ß

1. vmstat
Õâ¸ö¹¤¾ß¿ÉÒÔÈÃÄãÁ˽⵽ϵͳ×ÊÔ´µ±Ç°µÄ¸ºÔØÂÊ£¬°üÀ¨CPU£¬Äڴ棬swap¿Õ¼ä£¬ioµÈµÈ¡£
»ù±¾Ó÷¨
$ vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r  b   swpd   free   buff  cache   si   so&n ......

ÍõÛó Linux³¤ÆªÂÛ

½ñÌì¿´ÁËһƪºÜÌرðµÄÎÄÕ£¬ËäÈ»ÓеãÆ«¼¤£¬µ«ÖµµÃÉî˼£¬ÓÚÊÇתÁ˹ýÀ´£¡
±¾ÎÄÊÇһλÇ廪ÍËѧѧÉúËùд!ËûµÄÃû×Ö½ÐÍõÛó,È˺ܳöÃû£¬²»ÐÅ°Ù¶ÈһϾÍÖªµÀ£¡
ÎÒÒѾ­°ëÄêûÓÐʹÓà Windows µÄ·½Ê½¹¤×÷ÁË¡£Linux ¸ßЧµÄÍê³ÉÁËÎÒËùÓеŤ×÷¡£
GNU/Linux ²»ÊÇÿ¸öÈ˶¼ÏëÓõġ£Èç¹ûÄãÖ»ÐèÒª´¦ÀíÒ»°ãµÄÊÂÎñ£¬´òÓÎÏ·£¬ÄÇôÄã²»ÐèÒªÁ˽âÏ ......

LinuxÍøÂçЭÒéÕ»(Ò»)——SocketÈëÃÅ(1)

1¡¢TCP/IP²Î¿¼Ä£ÐÍ
ΪÁËʵÏÖ¸÷ÖÖÍøÂçµÄ»¥Á¬£¬¹ú¼Ê±ê×¼»¯×éÖ¯(ISO)Öƶ¨ÁË¿ª·Åʽϵͳ»¥Á¬(OSI)²Î¿¼Ä£ÐÍ¡£¾¡¹ÜOSIµÄÌåϵ½á¹¹´ÓÀíÂÛÉϽ²ÊDZȽÏÍêÕûµÄ£¬µ«Êµ¼ÊÉÏ£¬ÍêÈ«·ûºÏOSI¸÷²ãЭÒéµÄÉÌÓòúÆ·È´ºÜÉÙ½øÈëÊг¡¡£¶øʹÓÃTCP/IP ЭÒéµÄ²úÆ·È´´óÁ¿Ó¿ÈëÊг¡£¬¼¸ºõËùÓеŤ×÷Õ¾¶¼ÅäÓÐTCP/IPЭÒ飬ʹµÃTCP/IP ³ÉΪ¼ÆËã»úÍøÂçµÄʵ¼ÊµÄ¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ