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

Linux½ø³Ìµ÷¶Èʱ»ú


http://www.chineselinuxuniversity.net/articles/30602.shtml
Linux½ø³Ìµ÷¶È³ÌÐòËäÈ»
Ìرð
ÖØÒª
£¬µ«Ëü²»¹ýÊÇÒ»¸ö´æÔÚÓÚÄں˿ռäÖеĺ¯Êý¶øÒÑ£¬²¢²»ÉñÃØ¡£LinuxµÄµ÷¶È³ÌÐòÊÇÒ»¸ö½ÐSchedule£¨£©µÄº¯Êý£¬Õâ¸öº¯Êý±»µ÷ÓõÄƵÂʺܸߣ¬ÓÉËüÀ´¾ö¶¨ÊÇ·ñ
Òª½øÐнø³ÌµÄÇл»£¬Èç¹ûÒªÇл»µÄ»°£¬Çл»µ½Äĸö½ø³ÌµÈµÈ¡£ÎÒÃÇ
ÏÈÀ´¿´ÔÚʲôÇé¿ö
ÏÂÒªÖ´Ðе÷¶È³ÌÐò£¬ÎÒÃÇ°ÑÕâÖÖÇé¿ö½Ð×öµ÷¶Èʱ»ú¡£
Linuxµ÷¶Èʱ»úÖ÷Òª
ÓУº
1¡¢½ø³Ì״̬ת»»µÄʱ¿Ì£º½ø³ÌÖÕÖ¹¡¢½ø³Ì˯Ãß
£»
2¡¢µ±Ç°½ø³ÌµÄʱ¼ä
ƬÓÃÍêʱ£¨current->counter=0£©£»
3¡¢É豸Çý¶¯³ÌÐò
4¡¢½ø³Ì´ÓÖжϡ¢Òì³£¼°ÏµÍ³µ÷Ó÷µ»Øµ½Óû§Ì¬Ê±£»
ʱ»ú1£¬½ø³ÌÒªµ÷ÓÃsleep£¨£©»òexit£¨£©µÈº¯Êý½øÐÐ״̬ת»»£¬ÕâЩº¯Êý»áÖ÷¶¯µ÷Óõ÷¶È³ÌÐò½øÐнø³Ìµ÷¶È£»
ʱ»ú2£¬ÓÉÓÚ½ø³ÌµÄʱ¼äƬÊÇÓÉʱÖÓÖжÏÀ´¸üеģ¬Òò´Ë£¬ÕâÖÖÇé¿öºÍʱ»ú4ÊÇÒ»ÑùµÄ¡£
ʱ»ú3£¬µ±É豸Çý¶¯³ÌÐòÖ´Ð㤶øÖظ´µÄÈÎÎñʱ£¬Ö±½Óµ÷Óõ÷¶È³ÌÐò¡£ÔÚÿ´Î·´¸´Ñ­»·ÖУ¬Çý¶¯³ÌÐò¶¼¼ì²éneed_reschedµÄÖµ£¬Èç¹û±ØÒª£¬Ôòµ÷Óõ÷¶È³ÌÐòschedule()Ö÷¶¯·ÅÆúCPU¡£
ʱ»ú4£¬ÈçÇ°ËùÊö£¬²»¹ÜÊÇ´ÓÖжϡ¢Òì³£»¹ÊÇϵͳµ÷Ó÷µ»Ø£¬×îÖÕ¶¼µ÷ÓÃret_from_sys_call£¨£©£¬ÓÉÕâ¸öº¯Êý½øÐе÷¶È±êÖ¾µÄ¼ì²â£¬Èç¹û
±ØÒª£¬Ôòµ÷Óõ÷Óõ÷¶È³ÌÐò¡£ÄÇô£¬ÎªÊ²Ã´´Óϵͳµ÷Ó÷µ»ØʱҪµ÷Óõ÷¶È³ÌÐòÄØ£¿Õ⵱ȻÊÇ´ÓЧÂÊ¿¼ÂÇ¡£´Óϵͳµ÷Ó÷µ»ØÒâζ×ÅÒªÀ뿪ÄÚºË̬¶ø·µ»Øµ½Óû§Ì¬£¬¶ø×´
̬µÄת»»Òª»¨·ÑÒ»¶¨µÄʱ¼ä£¬Òò´Ë£¬ÔÚ·µ»Øµ½Óû§Ì¬Ç°£¬ÏµÍ³°ÑÔÚÄÚºË̬¸Ã´¦ÀíµÄÊÂÈ«²¿×öÍê¡£
¶ÔÓÚ
Ö±½ÓÖ´Ðе÷¶È³ÌÐòµÄʱ»ú£¬ÎÒÃDz»ÌÖÂÛ£¬ÒòΪºóÃæÎÒÃǽ«»áÃèÊöµ÷¶È³ÌÐòµÄ¹¤×÷¹ý³Ì¡£Ç°ÃæÎÒÃÇÌÖÂÛÁËʱÖÓÖжϣ¬ÖªµÀÁËʱÖÓÖжϵÄÖØÒª×÷Óã¬http://Ubuntu
one.cn/ÏÂÃæÎÒÃǾͼòµ¥¿´Ò»ÏÂÿ¸öʱÖÓÖжϷ¢ÉúʱÄÚºËÒª×öµÄ¹¤×÷£¬Ê×ÏȶÔÕâ¸ö×îƵ·±µÄµ÷¶Èʱ»úÓÐÒ»¸ö´óÌåÁ˽⣬ȻºóÔÙÏêϸÌÖÂÛµ÷¶È³ÌÐòµÄ¾ßÌ幤×÷¹ý³Ì¡£
ÿ¸öʱÖÓÖжϣ¨timer interrupt£©·¢Éúʱ£¬ÓÉÈý¸öº¯ÊýЭͬ¹¤×÷£¬¹²Í¬Íê³É½ø³ÌµÄÑ¡ÔñºÍÇл»£¬ËüÃÇÊÇ£ºschedule£¨£©¡¢do_timer£¨£©¼°ret_form_sys_call£¨£©¡£ÎÒÃÇÏÈÀ´½âÊÍÒ»ÏÂÕâÈý¸öº¯Êý£º
schedule£¨£©£º½ø³Ìµ÷¶Èº¯Êý£¬ÓÉËüÀ´Íê³É½ø³ÌµÄÑ¡Ôñ£¨µ÷¶È£©£»
do_timer£¨£©£ºÔÝÇÒ³Æ֮ΪʱÖÓº¯Êý£¬¸Ãº¯ÊýÔÚʱÖÓÖжϷþÎñ³ÌÐòÖб»µ÷Óã¬ÊÇʱÖÓÖжϷþÎñ³ÌÐòµÄÖ÷Òª×é³É²¿·Ö£¬¸Ãº¯Êý±»µ÷ÓõÄƵÂʾÍÊÇʱÖÓÖжϵÄƵÂʼ´Ã¿ÃëÖÓ100´Î£¨¼ò³Æ100ºÕ×È»ò100Hz£©£»
ret_from_sys_call£¨£©£ºÏµÍ³µ÷Ó÷µ»Øº¯Êý¡£µ±Ò»¸öϵͳµ÷ÓÃ


Ïà¹ØÎĵµ£º

linux³£ÓÃÃüÁî¼°¼¼ÇÉ


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

linuxÏ¿ª·¢Óöµ½µÄÎÊÌ⼯ºÏ

 ¼Ç¼ÔÚlinuxÏ¿ª·¢Óöµ½µÄ¸÷ÖÖÎÊÌ⣬·½±ãÒÔºó²éÕÒ¡£
 
1.¹ØÓÚshellÖнű¾µÄÖ´Ðз½Ê½£ºÔÚµ±Ç°½Å±¾Ö´Ðл¹ÊÇÆô¶¯Ò»¸öеÄshell½ø³ÌÀ´Ö´Ðнű¾¡£
¼ÙÉ赱ǰĿ¼ÏÂÓнű¾script.sh¡£
Æô¶¯Ò»¸öеÄshell½ø³ÌÀ´Ö´ÐУº
ÕâÊÇshellÖÐĬÈϵÄÖ´Ðз½Ê½ÊÇÆô¶¯Ò»¸öеÄshell½ø³Ì£¨×Ó½ø³Ì£©À´Ö´Ðнű¾£¬¼´sh script.sh»òÕ߸³Ó ......

Linux Shell ½ø¶ÈÌõÏÔʾº¯Êý£¨±¸Íü£©

1.µãºÅ½ø¶ÈÏÔʾcode 1
#!/bin/sh
#Êä³ö"."½ø¶ÈÌõº¯Êý£¬¼æÈÝbsh¡¢ksh¡¢bash
#Ê×ÏÈtrap 1 2 3 15Ðźţ¬ÖØÒª
trap 'kill $BG_PID;echo;exit' 1 2 3 15
function dots
      {
      stty -echo >/dev/null 2>&1
      ......

ÍƼö£ºLinuxÈëÃÅ11µã½¨Òé

תÔØÍƼö ---- LinuxÈëÃÅ11µã½¨Òé
Ëæ×Å
Linux
Ó¦ÓõÄÀ©Õ¹Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥
Linux
£¬¸ù¾Ýѧϰ
Windwos
µÄ¾­ÑéÍùÍùÓÐһЩãȻµÄ¸Ð¾õ£º²»Öª´ÓºÎ´¦¿ªÊ¼Ñ§Æð¡£ÕâÀï½éÉÜѧϰ
Linux
µÄһЩ½¨Òé¡£

Ò»¡¢´Ó»ù´¡¿ªÊ¼£º
 
 
 
³£³£ÓÐЩÅóÓÑÔÚ
Linux
ÂÛ̳ÎÊһЩÎÊÌ⣬²»¹ý£¬ÆäÖдó¶àÊýµÄÎÊÌⶼÊǺܻù´ ......

Red Hat enterprise linux 5 mysql°²×°²½Öè

Ò»¡¢°²×°·þÎñÆ÷¶Ë
£¨1£©¡¢ÔÚÓÐÁ½¸örmpÎļþµÄĿ¼ÏÂÔËÐÐÈçÏÂÃüÁ
[root@test1 local]# rpm -ivh MySQL-server-5.0.26-0.i386.rpm
ÏÔʾÈçÏÂÐÅÏ¢£º
warning: MySQL-server-5.0.26-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing……¡¡¡¡¡¡¡¡¡¡¡¡¡¡##################################### ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ