LinuxÄں˵Äͬ²½»úÖÆ£¨Ò»£©£ºÔ×Ó²Ù×÷
Ô×Ó²Ù×÷£ºUPºÍSMPµÄÒìͬ
Ô×Ó²Ù×÷ÊDz»¿É·Ö¸îµÄ£¬ÔÚÖ´ÐÐÍê±Ï²»»á±»ÈκÎÆäËüÈÎÎñ»òʼþÖжϡ£ÔÚµ¥´¦ÀíÆ÷ϵͳ£¨UniProcessor£©ÖУ¬Äܹ»ÔÚµ¥ÌõÖ¸ÁîÖÐÍê³ÉµÄ²Ù×÷¶¼¿ÉÒÔÈÏΪÊÇ"Ô×Ó²Ù×÷"£¬ÒòΪÖжÏÖ»ÄÜ·¢ÉúÓÚÖ¸ÁîÖ®¼ä¡£ÕâÒ²ÊÇijЩCPUÖ¸ÁîϵͳÖÐÒýÈëÁËtest_and_set¡¢test_and_clearµÈÖ¸ÁîÓÃÓÚÁÙ½ç×ÊÔ´»¥³âµÄÔÒò¡£µ«ÊÇ£¬ÔڶԳƶദÀíÆ÷£¨Symetric Multi-Processor£©½á¹¹ÖоͲ»Í¬ÁË£¬ÓÉÓÚϵͳÖÐÓжà¸ö´¦ÀíÆ÷ÔÚ¶ÀÁ¢µØÔËÐУ¬¼´Ê¹ÄÜÔÚµ¥ÌõÖ¸ÁîÖÐÍê³ÉµÄ²Ù×÷Ò²ÓпÉÄÜÊܵ½¸ÉÈÅ¡£ÎÒÃÇÒÔdecl£¨µÝ¼õÖ¸ÁΪÀý£¬ÕâÊÇÒ»¸öµäÐ͵Ä"¶Á£¸Ä£Ð´"¹ý³Ì£¬Éæ¼°Á½´ÎÄÚ´æ·ÃÎÊ¡£ÉèÏëÔÚ²»Í¬CPUÔËÐеÄÁ½¸ö½ø³Ì¶¼Ôڵݼõij¸ö¼ÆÊýÖµ£¬¿ÉÄÜ·¢ÉúµÄÇé¿öÊÇ£º
1£® CPU A£¨ÉϵĽø³Ì£¬ÒÔÏÂͬ£©´ÓÄÚ´æµ¥Ôª°Ñµ±Ç°¼ÆÊýÖµ£¨2£©×°ÔؽøËüµÄ¼Ä´æÆ÷ÖУ»
2£® CPU B´ÓÄÚ´æµ¥Ôª°Ñµ±Ç°¼ÆÊýÖµ£¨2£©×°ÔؽøËüµÄ¼Ä´æÆ÷ÖС£
3£® CPU AÔÚËüµÄ¼Ä´æÆ÷Öн«¼ÆÊýÖµµÝ¼õΪ1£»
4£® CPU BÔÚËüµÄ¼Ä´æÆ÷Öн«¼ÆÊýÖµµÝ¼õΪ1£»
5£® CPU A°ÑÐ޸ĺóµÄ¼ÆÊýÖµ£¨1£©Ð´»ØÄÚ´æµ¥Ôª¡£
6£® CPU B°ÑÐ޸ĺóµÄ¼ÆÊýÖµ£¨1£©Ð´»ØÄÚ´æµ¥Ôª¡£
ÎÒÃÇ¿´µ½£¬ÄÚ´æÀïµÄ¼ÆÊýÖµÓ¦¸ÃÊÇ0£¬È»¶øËüÈ´ÊÇ1¡£Èç¹û¸Ã¼ÆÊýÖµÊÇÒ»¸ö¹²Ïí×ÊÔ´µÄÒýÓüÆÊý£¬Ã¿¸ö½ø³Ì¶¼Ôڵݼõºó°Ñ¸ÃÖµÓë0½øÐбȽϣ¬´Ó¶øÈ·¶¨ÊÇ·ñÐèÒªÊͷŸù²Ïí×ÊÔ´¡£Õâʱ£¬Á½¸ö½ø³Ì¶¼È¥µôÁ˶Ըù²Ïí×ÊÔ´µÄÒýÓ㬵«Ã»ÓÐÒ»¸ö½ø³ÌÄܹ»ÊÍ·ÅËü--Á½¸ö½ø³Ì¶¼Íƶϳö£º¼ÆÊýÖµÊÇ1£¬¹²Ïí×ÊÔ´ÈÔÈ»ÔÚ±»Ê¹Óá£
Ô×ÓÐÔ²»¿ÉÄÜÓÉÈí¼þµ¥¶À±£Ö¤--±ØÐëÐèÒªÓ²¼þµÄÖ§³Ö£¬Òò´ËÊǺͼܹ¹Ïà¹ØµÄ¡£ÔÚx86ƽ̨ÉÏ£¬CPUÌṩÁËÔÚÖ¸ÁîÖ´ÐÐÆÚ¼ä¶Ô×ÜÏß¼ÓËøµÄÊֶΡ£CPUоƬÉÏÓÐÒ»ÌõÒýÏß#HLOCK pin£¬Èç¹û»ã±àÓïÑԵijÌÐòÖÐÔÚÒ»ÌõÖ¸ÁîÇ°Ãæ¼ÓÉÏǰ׺"LOCK"£¬¾¹ý»ã±àÒÔºóµÄ»úÆ÷´úÂë¾ÍʹCPUÔÚÖ´ÐÐÕâÌõÖ¸ÁîµÄʱºò°Ñ#HLOCK pinµÄµçλÀµÍ£¬³ÖÐøµ½ÕâÌõÖ¸Áî½áÊøʱ·Å¿ª£¬´Ó¶ø°Ñ×ÜÏßËøס£¬ÕâÑùͬһ×ÜÏßÉϱðµÄCPU¾ÍÔÝʱ²»ÄÜͨ¹ý×ÜÏß·ÃÎÊÄÚ´æÁË£¬±£Ö¤ÁËÕâÌõÖ¸ÁîÔڶദÀíÆ÷»·¾³ÖеÄÔ×ÓÐÔ¡£
LinuxÄÚºËÖеÄÔ×Ó²Ù×÷
Linux 2.4.21ÖУ¬Ô×ÓÀàÐ͵Ķ¨ÒåºÍÔ×Ó²Ù×÷API¶¼·ÅÔÚÄÚºËÔ´ÂëÊ÷µÄinclude/asm/atomic.hÎļþÖУ¬´ó²¿·ÖʹÓûã±àÓïÑÔʵÏÖ£¬ÒòΪcÓïÑÔ²¢²»ÄÜʵÏÖÕâÑùµÄ²Ù×÷¡£
ÔÚx86µÄÔ×Ó²Ù×÷ʵÏÖ´úÂëÖУ¬¶¨ÒåÁËLOCKºê£¬Õâ¸öºê¿ÉÒÔ·ÅÔÚËæºóµÄÄÚÁª»ã±àÖ¸Áî֮ǰ¡£Èç¹ûÊÇSMP£¬LOCKºê±»À©Õ¹ÎªlockÖ¸Á·ñÔò±»¶¨ÒåΪ¿Õ--µ¥CPUÎÞÐè·ÀÖ¹ÆäËüCPUµÄ¸ÉÈÅ£¬ËøÄÚ´æ×ÜÏßÍêÈ«ÊÇÔÚÀË·Ñʱ¼ä¡£
#ifdef CONFIG_SMP
#define LOCK "lock ; "
#else
#define LOCK ""
#e
Ïà¹ØÎĵµ£º
6)Linux³ÌÐòÉè¼ÆÈëÃÅ--ÏûÏ¢¹ÜÀí
Ç°ÑÔ:LinuxϵĽø³ÌͨÐÅ(IPC)
LinuxϵĽø³ÌͨÐÅ(IPC)
POSIXÎÞÃûÐźÅÁ¿
System VÐźÅÁ¿
System VÏûÏ¢¶ÓÁÐ
System V¹²ÏíÄÚ´æ
1¡£POSIXÎÞÃûÐźÅÁ¿ Èç¹ûÄãѧϰ¹ý²Ù×÷ϵͳ,ÄÇô¿Ï¶¨ÊìϤPV²Ù×÷ÁË.PV²Ù×÷ÊÇÔ×Ó
²Ù×÷.Ò²¾ÍÊDzÙ×÷ÊDz»¿ÉÒÔÖжϵÄ,ÔÚÒ»¶¨µÄʱ¼äÄÚ,Ö»Äܹ»ÓÐÒ»¸ö½ø³ÌµÄ´ ......
ÔÚLinuxÉϽ»²æ±àÒëpppd 2.4.4
1. ÏÂÔØpppd 2.4.4µÄÔ´´úÂë
ftp://ftp.samba.org/pub/ppp/
2. Ö±½Ó±àÒë
#./configure
#make clean
#make
3. ½»²æ±àÒë
ÐÞ¸Ä./pppd-2.4.4/pppd/Makefile, ×¢ÊÍÁ½ÐУº
#wenxy comment #LIBS += -lpcap
#wenxy comment #CFLAGS += -DPPP_FILTER
cross compile
......
1¡¢Linux »ù´¡
°²×°Linux²Ù×÷ϵͳ
LinuxÎļþϵͳ
Linux³£ÓÃÃüÁî
LinuxÆô¶¯¹ý³ÌÏê½â
ÊìϤLinux·þÎñÄܹ»¶ÀÁ¢°²×°Linux²Ù×÷ϵͳ
Äܹ»ÊìÁ·Ê¹ÓÃLinuxϵͳµÄ»ù±¾ÃüÁî
ÈÏʶLinuxϵͳµÄ³£Ó÷þÎñ°²×°Linux²Ù×÷ϵͳ
Linux»ù±¾ÃüÁîʵ¼ù
ÉèÖÃLinux»·¾³±äÁ¿
¶¨ÖÆLinuxµÄ·þÎñ Shell ±à³Ì»ù´¡Ê¹ÓÃvi±à¼Îļþ
ʹÓÃEmac ......
ΪÁ˸üºÃµÄ½â¾öÐéÄâ»úÓëÖ÷»úµÄ¹²ÏíÎÊÌ⣬VMware¹«Ë¾ÓÐÒ»¸öVMWare£tools£¬À´ÊµÏÖÎļþ¹²Ïí¡£ÕâÀïÖ÷Òª½²µÄÊÇÔÚWindowsÏÂÓà VmwareÐéÄâLinuxÀ´ÓëwindowsÀ´¹²Ïí¡£
¡¡¡¡1¡¢°²×°¿Í»§»úϵͳ£¬linuxÕâÀïÑ¡ÓÃCentOS5
¡¡¡¡2¡¢Æô¶¯ÐéÄâ»úÖеÄLinuxºó£¬£¨×¢Òâ±ØÐëÊÇÆô¶¯ÐéÄâ»úºó£©¡£Ñ¡Ôñ²Ëµ¥ÀïµÄVMÑ¡ÏÀïÃæÓÐÒ»¸ö×ÓÏîÊÇInstall VM ......
linux ϼ¯³É svn ÖÁ eclipse È«¹ý³Ì
ÒòΪ java ¿çƽ̨,¶ø eclipse ÊǸö´¿ java ¿ª·¢ÏîÄ¿,ËùÒԴ˼¯³É°²×°¹ý³ÌͬÑùÊÊÓÃÓÚ windows ϵͳ.
µÚÒ»²½:ÏÂÔؼ¯³É svn ÖÁ eclipse ËùÐèµÄ°ü site-1.6.5.zip(¿ÉÒÔÈ¥¹ÙÍø http://subclipse.tigris.org/ ÏÂÔØ,Ò²¿ÉÒÔÈ¥×÷ÕßµÄ csdn ×ÊÔ´ÀïÏÂÔØ site-1.6.5.zip ²å¼þ)
µÚ¶þ²½:½« si ......