ÉîÈëÀí½âLinuxµÄϵͳµ÷ÓÃ
Ò»¡¢ ʲôÊÇϵͳµ÷ÓÃ
ÔÚLinuxµÄÊÀ½çÀÎÒÃǾ³£»áÓöµ½ÏµÍ³µ÷ÓÃÕâÒ»ÊõÓËùνϵͳµ÷Ó㬾ÍÊÇÄÚºËÌṩµÄ¡¢¹¦ÄÜÊ®·ÖÇ¿´óµÄһϵÁеĺ¯Êý¡£ÕâЩϵͳµ÷ÓÃÊÇÔÚÄÚºËÖÐʵÏֵģ¬ÔÙͨ¹ýÒ»¶¨µÄ·½Ê½°Ñϵͳµ÷ÓøøÓû§£¬Ò»°ã¶¼Í¨¹ýÃÅ(gate)ÏÝÈë(trap)ʵÏÖ¡£ÏµÍ³µ÷ÓÃÊÇÓû§³ÌÐòºÍÄں˽»»¥µÄ½Ó¿Ú¡£
¶þ¡¢ ϵͳµ÷ÓõÄ×÷ÓÃ
ϵͳµ÷ÓÃÔÚLinuxϵͳÖз¢»Óמ޴óµÄ×÷Óã¬Èç¹ûûÓÐϵͳµ÷Óã¬ÄÇôӦÓóÌÐò¾ÍʧȥÁËÄں˵ÄÖ§³Ö¡£
ÎÒÃÇÔÚ±à³ÌʱÓõ½µÄºÜ¶àº¯Êý£¬Èçfork¡¢openµÈÕâЩº¯Êý×îÖÕ¶¼ÊÇÔÚϵͳµ÷ÓÃÀïʵÏֵģ¬±ÈÈç˵ÎÒÃÇÓÐÕâÑùÒ»¸ö³ÌÐò£º
ÕâÀïÎÒÃÇÓõ½ÁËÁ½¸öº¯Êý£¬¼´forkºÍexit,ÕâÁ½º¯Êý¶¼ÊÇglibcÖеĺ¯Êý£¬µ«ÊÇÈç¹ûÎÒÃǸú×Ùº¯ÊýµÄÖ´Ðйý³Ì£¬¿´¿´glibc¶ÔforkºÍexitº¯ÊýµÄʵÏ־ͿÉÒÔ·¢ÏÖÔÚglibcµÄʵÏÖ´úÂëÀﶼÊDzÉÓÃÈíÖжϵķ½Ê½ÏÝÈëµ½ÄÚºËÖÐÔÙͨ¹ýϵͳµ÷ÓÃʵÏÖº¯ÊýµÄ¹¦Äܵġ£¾ßÌå¹ý³ÌÎÒÃÇÔÚϵͳµ÷ÓõÄʵÏÖ¹ý³Ì»áÏêϸµÄ½²µ½¡£
Óɴ˿ɼû£¬ÏµÍ³µ÷ÓÃÊÇÓû§½Ó¿ÚÔÚÄÚºËÖеÄʵÏÖ£¬Èç¹ûûÓÐϵͳµ÷Óã¬Óû§¾Í²»ÄÜÀûÓÃÄںˡ£
Èý¡¢ ϵͳµ÷ÓõÄÏÖʵ¼°µ÷Óùý³Ì
Ïêϸ½²Êöϵͳµ÷ÓõÄ֮ǰҲ½²Ò»ÏÂLinuxϵͳµÄһЩ±£»¤»úÖÆ¡£
LinuxϵͳÔÚCPUµÄ±£»¤Ä£Ê½ÏÂÌṩÁËËĸöÌØȨ¼¶±ð£¬Ä¿Ç°Äں˶¼Ö»Óõ½ÁËÆäÖеÄÁ½¸öÌØȨ¼¶±ð£¬·Ö±ðΪ“ÌØȨ¼¶0”ºÍ“ÌØȨ¼¶3”,¼¶±ð0Ò²¾ÍÊÇÎÒÃÇͨ³£Ëù½²µÄÄÚºËģʽ£¬¼¶±ð3Ò²¾ÍÊÇÎÒÃÇͨ³£Ëù½²µÄÓû§Ä£Ê½¡£»®·ÖÕâÁ½¸ö¼¶±ðÖ÷ÒªÊǶÔϵͳÌṩ±£»¤¡£ÄÚºËģʽ¿ÉÒÔÖ´ÐÐһЩÌØȨָÁîºÍ½øÈëÓû§Ä£Ê½£¬¶øÓû§Ä£Ê½Ôò²»ÄÜ¡£
ÕâÀïÌرðÌá³öµÄÊÇ£¬ÄÚºËģʽÓëÓû§Ä£Ê½·Ö±ðʹÓÃ×Ô¼ºµÄ¶ÑÕ»£¬µ±·¢ÉúģʽÇл»µÄʱºòͬʱҪ½øÐжÑÕ»µÄÇл»¡£
ÿ¸ö½ø³Ì¶¼ÓÐ×Ô¼ºµÄµØÖ·¿Õ¼ä£¨Ò²³ÆΪ½ø³Ì¿Õ¼ä£©£¬½ø³ÌµÄµØÖ·¿Õ¼äÒ²·ÖΪÁ½²¿·Ö£ºÓû§¿Õ¼äºÍϵͳ¿Õ¼ä£¬ÔÚÓû§Ä£Ê½ÏÂÖ»ÄÜ·ÃÎʽø³ÌµÄÓû§¿Õ¼ä£¬ÔÚÄÚºËģʽÏÂÔò¿ÉÒÔ·ÃÎʽø³ÌµÄÈ«²¿µØÖ·¿Õ¼ä£¬Õâ¸öµØÖ·¿Õ¼äÀïµÄµØÖ·ÊÇÒ»¸öÂß¼µØÖ·£¬Í¨¹ýϵͳ¶ÎÃæʽµÄ¹ÜÀí»úÖÆ£¬·ÃÎʵÄʵ¼ÊÄÚ´æÒª×ö¶þ¼¶µØַת»»£¬¼´£ºÂß¼µØÖ·?ÏßÐÔµØÖ·?ÎïÀíµØÖ·¡£
ϵͳµ÷ÓöÔÓÚÄÚºËÀ´Ëµ¾ÍÏ൱ÓÚº¯Êý£¬ÎÒÃÇÊǹؼüÎÊÌâÊÇ´ÓÓû§Ä£Ê½µ½ÄÚºËģʽµÄת»»¡¢¶ÑÕ»µÄÇл»ÒÔ¼°²ÎÊýµÄ´«µÝ¡£
ÏÂÃ潫½áºÏÄÚºËÔ´´úÂë¶ÔÕâЩ¹ý³Ì½øÐзÖÎö£¬ÒÔÏ·ÖÎö»·¾³ÎªFC2,kernel 2.6.5
ÏÂÃæÊÇÄÚºËÔ´´úÂëÀïarch/i386/kernel/entry.SµÄÒ»¶Î´úÂë¡£
&nbs
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
£±¡¢²é¿´IP¡¡¡¡Ifconfig
¡¡¡¡£²¡¢ÅäÖÃIPµÄ·½·¨£º
¡¡¡¡A¡¢ ÕâÖÖ·½·¨Á¢¼´ÉúЧ¡¡µ«ÊÇÖØÆô½«²»»á±£´æ¡££¨³ýÁËÕâ¸ö·½·¨µÄÆäËü·½·¨¶¼¿ÉÒÔ±£´æÏÂÀ´£©
¡¡¡¡Ifconfig eth£° 1.1.1.1 netmask 255.0.0.0 up
¡¡¡¡Ifconfig eth0:1 1.1.1.3 up¡¡¡¡ÉèÖÃÒ»¸öÍø¿¨¶à¸öIPµÄ·½·¨£¨ÔÚÉèÖÃÐéÄâÖ÷»úʱÓÐ ......
¼ò½é
ÕâƪÎÄÕÂÖ÷Òª¼Ç¼ÎÒÔÚÊÔͼ½â¾öÈçºÎ¾¡¿ÉÄܾ«È·µØÔÚij¸öÌض¨µÄʱ¼ä¼ä¸ôÖ´ÐÐijÏî¾ßÌåÈÎÎñʱµÄ˼·Àú³Ì£¬²¢ÔÚºóÆÚ¶ÔÏà¹ØµÄAPI½øÐеĹéÄɺÍ×ܽᣬÒÔ±¸²Î¿¼¡£
ÎÊÌâÒý³ö
ºÜ¶àʱºò£¬ÎÒÃÇ»áÓÐÀàËƓÿ¸ô¶à³¤Ê±¼äÖ´ÐÐijÏîÈÎÎñ
”µÄÐèÇó£¬Õ§¿´Õâ¸öÎÊÌâ²¢²»Äѽâ¾ö£¬ÊµÔò²¢²»ÈÝÒ×£¬ÓкܶàÒþº¬Ìõ¼þÐèÒª¿¼ÂÇ£¬Ö ......
ת×Ôhttp://blog.163.com/ericxia_gnikam/blog/static/969208792008102545614453/
ÔÚLinux kernelµÄÔ´´úÂëÖУ¬¾³£Äܼûµ½if(likely(x))»òif(unlikely(x))Ö®ÀàµÄÓ÷¨£¬ÆäÈ·Çк¬ÒåÐèҪ˵Ã÷һϣ¬ÒÔ±ã¸üºÃµÄÀí½âkernelµÄÔ´´úÂë¡£
likelyÓëunlikelyÕâÁ½¸öºêÔÚlinux/compiler.hÖеĶ¨ÒåÈçÏ£º
#define likely ......
Ê×ÏÈ°²×°±ØÐèµÄ¿ª·¢
°ü
sudo apt-get install gcc g++ libgcc1 libg++ make gdb
°²×°MYSQLµÄCÓïÑÔ¿ª·¢°ü
sudo apt-get install libmysql++-dev libmysql++2c2a libmysqlclient15-dev libmysqlclient15off
°ÑlibÎļþ¿½±´µ½¹«ÓÃ
sudo cp /usr/lib/mysql/* /usr/lib/
½¨Á¢Ò»¸öÐÂÎļþtest.cpp
vim test.cpp
ÊäÈëÄÚÈÝ
......