linuxÓëuclinux ÄÚ´æ¹ÜÀí£¨1£©
Ó¦¸Ã˵uClinuxͬ±ê×¼LinuxµÄ×î´óÇø±ð¾ÍÔÚÓÚÄÚ´æ¹ÜÀí£¬Í¬Ê±Ò²ÓÉÓÚuClinuxµÄÄÚ´æ¹ÜÀíÒý·¢ÁËһЩ±ê×¼LinuxËù²»»á³öÏÖµÄÎÊÌâ¡£±¾ÎĽ«°ÑuClinuxÄÚ´æ¹ÜÀíͬ±ê×¼LinuxµÄÄÇÄÚ´æ¹ÜÀí²¿·Ö½øÐбȽϷÖÎö¡£
±ê×¼LinuxʹÓõÄÐéÄâ´æ´¢Æ÷¼¼Êõ
±ê×¼LinuxʹÓÃÐéÄâ´æ´¢Æ÷¼¼Êõ£¬ÕâÖÖ¼¼ÊõÓÃÓÚÌṩ±È¼ÆËã»úϵͳÖÐʵ¼ÊʹÓõÄÎïÀíÄÚ´æ´óµÃ¶àµÄÄÚ´æ¿Õ¼ä¡£Ê¹ÓÃÕß½«¸Ð¾õµ½ºÃÏñ³ÌÐò¿ÉÒÔʹÓ÷dz£´óµÄÄÚ´æ¿Õ¼ä£¬´Ó¶øʹµÃ±à³ÌÈËÔ±ÔÚд³ÌÐòʱ²»Óÿ¼ÂǼÆËã»úÖеÄÎïÀíÄÚ´æµÄʵ¼ÊÈÝÁ¿¡£
ΪÁËÖ§³ÖÐéÄâ´æ´¢¹ÜÀíÆ÷µÄ¹ÜÀí£¬Linuxϵͳ²ÉÓ÷ÖÒ³£¨paging£©µÄ·½Ê½À´ÔØÈë½ø³Ì¡£Ëùν·ÖÒ³¼ÈÊÇ°Ñʵ¼ÊµÄ´æ´¢Æ÷·Ö¸îΪÏàͬ´óСµÄ¶Î£¬ÀýÈçÿ¸ö¶Î1024¸ö×Ö½Ú£¬ÕâÑù1024¸ö×Ö½Ú´óСµÄ¶Î±ã³ÆΪһ¸öÒ³Ã棨page£©¡£
ÐéÄâ´æ´¢Æ÷ÓÉ´æ´¢Æ÷¹ÜÀí»úÖƼ°Ò»¸ö´óÈÝÁ¿µÄ¿ìËÙÓ²ÅÌ´æ´¢Æ÷Ö§³Ö¡£ËüµÄʵÏÖ»ùÓÚ¾Ö²¿ÐÔÔÀí£¬µ±Ò»¸ö³ÌÐòÔÚÔËÐÐ֮ǰ£¬Ã»ÓбØҪȫ²¿×°ÈëÄڴ棬¶øÊǽö½«ÄÇЩµ±Ç°ÒªÔËÐеÄÄÇЩ²¿·ÖÒ³Ãæ»ò¶Î×°ÈëÄÚ´æÔËÐУ¨copy-on-write£©£¬ÆäÓàÔÝʱÁôÔÚÓ²ÅÌÉϳÌÐòÔËÐÐʱÈç¹ûËüËùÒª·ÃÎʵÄÒ³£¨¶Î£©ÒÑ´æÔÚ£¬Ôò³ÌÐò¼ÌÐøÔËÐУ¬Èç¹û·¢ÏÖ²»´æÔÚµÄÒ³£¨¶Î£©£¬²Ù×÷ϵͳ½«²úÉúÒ»¸öÒ³´íÎó£¨page fault£©£¬Õâ¸ö´íÎóµ¼Ö²Ù×÷ϵͳ°ÑÐèÒªÔËÐеIJ¿·Ö¼ÓÔص½ÄÚ´æÖС£±ØҪʱ²Ù×÷ϵͳ»¹¿ÉÒ԰Ѳ»ÐèÒªµÄÄÚ´æÒ³£¨¶Î£©½»»»µ½´ÅÅÌÉÏ¡£ÀûÓÃÕâÑùµÄ·½Ê½¹ÜÀí´æ´¢Æ÷£¬±ã¿É°ÑÒ»¸ö½ø³ÌËùÐèÒªÓõ½µÄ´æ´¢Æ÷ÒÔ»¯ÕûΪÁãµÄ·½Ê½£¬ÊÓÐèÇó·ÖÅúÔØÈ룬¶øºËÐijÌÐòÔòƾ½èÊôÓÚÿ¸öÒ³ÃæµÄÒ³ÂëÀ´Íê³ÉÑ°Ö·¸÷¸ö´æ´¢Æ÷Çø¶ÎµÄ¹¤×÷¡£
±ê×¼LinuxÊÇÕë¶ÔÓÐÄÚ´æ¹ÜÀíµ¥ÔªµÄ´¦ÀíÆ÷Éè¼ÆµÄ¡£ÔÚÕâÖÖ´¦ÀíÆ÷ÉÏ£¬ÐéÄâµØÖ·±»Ë͵½ÄÚ´æ¹ÜÀíµ¥Ôª£¨MMU£©£¬°ÑÐéÄâµØÖ·Ó³ÉäΪÎïÀíµØÖ·¡£
ͨ¹ý¸³Óèÿ¸öÈÎÎñ²»Í¬µÄÐéÄâ--ÎïÀíµØַת»»Ó³É䣬֧³Ö²»Í¬ÈÎÎñÖ®¼äµÄ±£»¤¡£µØַת»»º¯ÊýÔÚÿһ¸öÈÎÎñÖж¨Ò壬ÔÚÒ»¸öÈÎÎñÖеÄÐéÄâµØÖ·¿Õ¼äÓ³Éäµ½ÎïÀíÄÚ´æµÄÒ»¸ö²¿·Ö£¬¶øÁíÒ»¸öÈÎÎñµÄÐéÄâµØÖ·¿Õ¼äÓ³Éäµ½ÎïÀí´æ´¢Æ÷ÖеÄÁíÍâÇøÓò¡£¼ÆËã»úµÄ´æ´¢¹ÜÀíµ¥Ôª£¨MMU£©Ò»°ãÓÐÒ»×é¼Ä´æÆ÷À´±êʶµ±Ç°ÔËÐеĽø³ÌµÄת»»±í¡£ÔÚµ±Ç°½ø³Ì½«CPU·ÅÆú¸øÁíÒ»¸ö½ø³Ìʱ£¨Ò»´ÎÉÏÏÂÎÄÇл»£©£¬ÄÚºËͨ¹ýÖ¸Ïòнø³ÌµØַת»»±íµÄÖ¸Õë¼ÓÔØÕâЩ¼Ä´æÆ÷¡£MMU¼Ä´æÆ÷ÊÇÓÐÌØȨµÄ£¬Ö»ÄÜÔÚÄÚºË̬²ÅÄÜ·ÃÎÊ¡£Õâ¾Í±£Ö¤ÁËÒ»¸ö½ø³ÌÖ»ÄÜ·ÃÎÊ×Ô¼ºÓû§¿Õ¼äÄڵĵØÖ·£¬¶ø²»»á·ÃÎʺÍÐÞ¸ÄÆäËü½ø³ÌµÄ¿Õ¼ä¡£µ±¿ÉÖ´ÐÐÎļþ±»¼ÓÔØʱ£¬¼ÓÔØÆ÷¸ù¾ÝȱʡµÄldÎļþ£¬°Ñ³ÌÐò¼ÓÔص½ÐéÄâÄÚ´æµÄÒ»¸ö¿Õ¼ä£¬ÒòΪÕâ¸öÔÒòʵ¼ÊÉϺܶà³ÌÐòµÄÐéÄâµØÖ·¿Õ¼äÊÇÏàͬµÄ£¬µ«ÊÇÓÉÓÚת»»º¯Êý²»Í¬
Ïà¹ØÎĵµ£º
linux²é¿´ÏµÍ³ÊôÐÔ
ϵͳ
# uname -a # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo # ²é¿´CPUÐÅÏ¢
# hostname &n ......
½»²æ±àÒë»ùÓÚARMµÄLinuxÄÚºË֮ǰ,ÎÒÃÇ×÷ÒÔϵÄ×¼±¸¹¤×÷£º
1¡¢ÒѾ°²×°ºÃÒ»Ì×ÄãÊìϤµÄ½»²æ±àÒ빤¾ß£¨½¨Á¢ºÃ½»²æ±àÒë»·¾³£©¡£
2¡¢Ñ¡ÔñÒ»Ì×ÄãÊìϤµÄ¹¦ÄÜ×ã¹»ÄãʹÓõÄÄںˣ¬µ±È»£¬Õâ¸öÄÚºËÊÇÊʺÏÓÃÄãµÄ½»²æ±àÒ빤¾ß±àÒëµÄ¡£
ÕÆÎÕÒÔÉÏ2µã£¬»ù±¾ÉϾͲ¶àÁË¡£ÕâÀïĬÈÏÄãÖªµÀµÄһЩ³£ÓÃ֪ʶ££££ÃüÁî£ ......
Linux select()Ïê½â
selectϵͳµ÷ÓÃÊÇÓÃÀ´ÈÃÎÒÃǵijÌÐò¼àÊÓ¶à¸öÎļþ¾ä±ú(file descriptor)µÄ״̬±ä»¯µÄ¡£³ÌÐò»áÍ£ÔÚselectÕâÀïµÈ´ý£¬Ö±µ½±»¼àÊÓµÄÎļþ¾ä±úÓÐijһ¸ö»ò¶à¸ö·¢ÉúÁË״̬¸Ä±ä¡£
ÎļþÔÚ¾ä±úÔÚLinuxÀïºÜ¶à£¬Èç¹ûÄãmanij¸öº¯Êý£¬ÔÚº¯Êý·µ»ØÖµ²¿·Ö˵µ½³É¹¦ºóÓÐÒ»¸öÎļþ¾ä±ú±»´´½¨µÄ¶¼ÊÇ ......
Linux® ¿É¼ÓÔØÄÚºËÄ£¿é£¨´ÓÄÚºËµÄ 1.2 °æ±¾¿ªÊ¼ÒýÈ룩ÊÇ Linux Äں˵Ä×îÖØÒª´´ÐÂÖ®Ò»¡£ËüÃÇÌṩÁË¿ÉÉìËõµÄ¡¢¶¯Ì¬µÄÄںˡ£Ì½Ë÷Òþ²ØÔڿɼÓÔØÄ£¿éºóÃæµÄÔÀí£¬²¢Ñ§Ï°ÕâЩ¶ÀÁ¢µÄ¶ÔÏóÈçºÎ¶¯Ì¬µØת»»³É Linux Äں˵ÄÒ»²¿·Ö¡£
Linux ¾ÍÊÇͨ³£Ëù˵µÄµ¥Äںˣ¨monolithic kernel£©
£¬¼´²Ù×÷ϵͳµÄ´ó²¿·Ö¹¦Äܶ¼±»³ÆΪÄÚº ......