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

LinuxÄÚºËͬ²½½éÉܺͷ½·¨

LinuxÉ豸Çý¶¯ÖбØÐë½â¾öµÄÒ»¸öÎÊÌâÊǶà¸ö½ø³Ì¶Ô¹²Ïí×ÊÔ´µÄ²¢·¢·ÃÎÊ£¬²¢·¢·ÃÎʻᵼÖ¾ºÌ¬£¬linuxÌṩÁ˶àÖÖ½â¾ö¾ºÌ¬ÎÊÌâµÄ·½Ê½£¬ÕâЩ·½Ê½Êʺϲ»Í¬µÄÓ¦Óó¡¾°¡£
 
LinuxÄÚºËÊǶà½ø³Ì¡¢¶àÏ̵߳IJÙ×÷ϵͳ£¬ËüÌṩÁËÏ൱ÍêÕûµÄÄÚºËͬ²½·½·¨¡£ÄÚºËͬ²½·½·¨ÁбíÈçÏ£º
ÖжÏÆÁ±Î
Ô­×Ó²Ù×÷
×ÔÐýËø
¶Áд×ÔÐýËø
˳ÐòËø
ÐźÅÁ¿
¶ÁдÐźÅÁ¿
BKL£¨´óÄÚºËËø£©
SeqËø
Ò»¡¢²¢·¢Ó뾺̬£º
¶¨Ò壺
²¢·¢£¨concurrency£©Ö¸µÄÊǶà¸öÖ´Ðе¥ÔªÍ¬Ê±¡¢²¢Ðб»Ö´ÐУ¬¶ø²¢·¢µÄÖ´Ðе¥Ôª¶Ô¹²Ïí×ÊÔ´£¨Ó²¼þ×ÊÔ´ºÍÈí¼þÉϵÄÈ«¾Ö±äÁ¿¡¢¾²Ì¬±äÁ¿µÈ£©µÄ·ÃÎÊÔòºÜÈÝÒ×µ¼Ö¾ºÌ¬£¨race conditions£©¡£
ÔÚlinuxÖУ¬Ö÷ÒªµÄ¾ºÌ¬·¢ÉúÔÚÈçϼ¸ÖÖÇé¿ö£º
1¡¢¶Ô³Æ¶à´¦ÀíÆ÷£¨SMP£©¶à¸öCPU
ÌصãÊǶà¸öCPUʹÓù²Í¬µÄϵͳ×ÜÏߣ¬Òò´Ë¿É·ÃÎʹ²Í¬µÄÍâÉèºÍ´æ´¢Æ÷¡£
2¡¢µ¥CPUÄÚ½ø³ÌÓëÇÀÕ¼ËüµÄ½ø³Ì
3¡¢Öжϣ¨Ó²Öжϡ¢ÈíÖжϡ¢Tasklet¡¢µ×°ë²¿£©Óë½ø³ÌÖ®¼ä
Ö»Òª²¢·¢µÄ¶à¸öÖ´Ðе¥Ôª´æÔÚ¶Ô¹²Ïí×ÊÔ´µÄ·ÃÎÊ£¬¾ºÌ¬¾ÍÓпÉÄÜ·¢Éú¡£
Èç¹ûÖжϴ¦Àí³ÌÐò·ÃÎʽø³ÌÕýÔÚ·ÃÎʵÄ×ÊÔ´£¬Ôò¾ºÌ¬Ò²»á»á·¢Éú¡£
¶à¸öÖжÏÖ®¼ä±¾ÉíÒ²¿ÉÄÜÒýÆð²¢·¢¶øµ¼Ö¾ºÌ¬£¨Öжϱ»¸ü¸ßÓÅÏȼ¶µÄÖжϴò¶Ï£©¡£
 
½â¾ö¾ºÌ¬ÎÊÌâµÄ;¾¶ÊDZ£Ö¤¶Ô¹²Ïí×ÊÔ´µÄ»¥³â·ÃÎÊ£¬Ëùν»¥³â·ÃÎʾÍÊÇÖ¸Ò»¸öÖ´Ðе¥ÔªÔÚ·ÃÎʹ²Ïí×ÊÔ´µÄʱºò£¬ÆäËûµÄÖ´Ðе¥Ôª¶¼±»½ûÖ¹·ÃÎÊ¡£
 
·ÃÎʹ²Ïí×ÊÔ´µÄ´úÂëÇøÓò±»³ÆΪÁÙ½çÇø£¬ÁÙ½çÇøÐèÒªÒÔijÖÖ»¥³â»úÖƼÓÒÔ±£»¤£¬ÖжÏÆÁ±Î£¬Ô­×Ó²Ù×÷£¬×ÔÐýËø£¬ºÍÐźÅÁ¿¶¼ÊÇlinuxÉ豸Çý¶¯ÖпɲÉÓõĻ¥³â;¾¶¡£
 
ÁÙ½çÇøºÍ¾ºÕùÌõ¼þ£º
ËùνÁÙ½çÇø£¨critical regions£©¾ÍÊÇ·ÃÎʺͲÙ×÷¹²ÏíÊý¾ÝµÄ´úÂë¶Î£¬ÎªÁ˱ÜÃâÔÚÁÙ½çÇøÖв¢·¢·ÃÎÊ£¬±à³ÌÕß±ØÐë±£Ö¤ÕâЩ´úÂëÔ­×ÓµØÖ´ÐЗ—Ò²¾ÍÊÇ˵£¬´úÂëÔÚÖ´ÐнáÊøÇ°²»¿É±»´ò¶Ï£¬¾ÍÈçͬÕû¸öÁÙ½çÇøÊÇÒ»¸ö²»¿É·Ö¸îµÄÖ¸ÁîÒ»Ñù£¬Èç¹ûÁ½¸öÖ´ÐÐÏß³ÌÓпÉÄÜ´¦ÓÚͬһ¸öÁÙ½çÇøÖУ¬ÄÇô¾ÍÊdzÌÐò°üº¬Ò»¸öbug£¬Èç¹ûÕâÖÖÇé¿ö·¢ÉúÁË£¬ÎÒÃǾͳÆ֮Ϊ¾ºÕùÌõ¼þ£¨race conditions£©£¬±ÜÃâ²¢·¢ºÍ·ÀÖ¹¾ºÕùÌõ¼þ±»³ÆΪͬ²½¡£
 
ËÀËø£º
ËÀËøµÄ²úÉúÐèÒªÒ»¶¨Ìõ¼þ£ºÒªÓÐÒ»¸ö»ò¶à¸öÖ´ÐÐÏ̺߳ÍÒ»¸ö»ò¶à¸ö×ÊÔ´£¬Ã¿¸öÏ̶߳¼ÔڵȴýÆäÖеÄÒ»¸ö×ÊÔ´£¬µ«ËùÓеÄ×ÊÔ´¶¼ÒѾ­±»Õ¼ÓÃÁË£¬ËùÓÐÏ̶߳¼ÔÚÏ໥µÈ´ý£¬µ«ËüÃÇÓÀÔ¶²»»áÊÍ·ÅÒѾ­Õ¼ÓеÄ×ÊÔ´£¬ÓÚÊÇÈκÎÏ̶߳¼ÎÞ·¨¼ÌÐø£¬Õâ±ãÒâζ×ÅËÀËøµÄ·¢Éú¡£
 
¶þ¡¢ÖжÏÆÁ±Î
ÔÚµ¥CPU·¶Î§ÄÚ±ÜÃ⾺̬µÄÒ»ÖÖ¼òµ¥·½·¨ÊÇÔÚ½øÈëÁÙ½çÇø֮ǰÆÁ±ÎϵͳµÄÖжϡ£
ÓÉÓÚlin


Ïà¹ØÎĵµ£º

LinuxÄÚºËѧϰ(תÌû+Ô­´´)

     ²Ù×÷ϵͳÊÇÒ»¸ö·Ç³£¸´ÔÓµÄÈí¼þ,Éè¼ÆºÍʵÏÖÒ»¸ö²Ù×÷ϵͳÐèÒª¾ßÓо«ÉîµÄÀíÂÛ֪ʶºÍ¸ß³¬µÄʵ¼ùÄÜÁ¦.´«Í³µÄ²Ù×÷ϵͳÉè¼Æ¿Î³Ì,¹ýÓÚÆ«ÖØÀíÂÛµÄѧϰ,ȱ·¦¶Ôʵ¼ùµÄÖ¸µ¼¡£Ï£ÍûÉîÈëѧϰ²Ù×÷ϵͳµÄÉè¼Æ£¬×îºÃµÄ·½·¨¾ÍÊÇÕÒÒ»¸ö²Ù×÷ϵͳÀ´×Ô¼ºÊµ¼ù£¬ÔÚʵ¼ùÖÐѧϰ£¬¿ÉÒÔ´´Ôì³öÆæ¼£¡£
     ......

linuxµÄ¼òµ¥ÍøÂçÅäÖÃ

1¡¢RootµÇ¼
2¡¢²éip:ifcongfig
3¡¢ÐÞ¸ÄÍøÂçÉèÖÃ
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=VirtualBox
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
4¡¢Ìí¼ÓÐÂÓû§º ......

LINUX°²×°Íø¿¨Çý¶¯Ê±ÌáʾÕÒ²»µ½.autoconf.h

ÔÚfc8µÄdom0ÉÏ°²×°e1000eÍø¿¨Çý¶¯
#make
#Linux kernel source not configured: missing autoconf.h
½â¾ö·½·¨£º
ÔÚ±àÒëxenʱδʹÓÃmake config
´Ëʱ¿ÉÒÔÕÒµ½Ô´Â룬ÆäÖаüº¬.configÎļþ£¬ÔËÐÐmake oldconfig¼´¿ÉÉú³Éautoconf.h
´Ó¶ø¿ÉÒԳɹ¦±àÒë°²×°Äںˡ£ ......

LinuxµÄDateºÍTime

ÖÜÐ÷ºê
http://zxuhong.blog.51cto.com/368977/74442
 
1.1 ¸ÅÊö
ÊÀ½ç±ê׼ʱ¼ä£¨Coordinated Universal Time£¬UTC£©£¬Ò²¾ÍÊÇ´ó¼ÒËùÊìÖªµÄ¸ñÁÖÍþÖαê׼ʱ ¼ä£¨Greenwich Mean Time£¬GMT£©¡£ÊÀ½ç¸÷µØʱ¼äÒ²ÊÀ½ç±ê׼ʱ¼äΪ»ù×¼»®·ÖΪ²»Í¬µÄʱÇø£¬ÀýÈ磬ÖйúµÄ±±¾©Ê±¼äÓëUTCµÄʱ²îΪ+8£¬Ò²¾ÍÊÇUTC+8¡£ÃÀ¹úÊÇUTC-5¡£
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ