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

[ת]LinuxÖж¨Ê±Æ÷µÄË㷨ʵÏÖ

LinuxÖж¨Ê±Æ÷µÄË㷨ʵÏÖ
¶¨Ê±Æ÷µÄ×÷ÓÃ
       ¶¨Ê±Æ÷ÔÚ²Ù×÷ϵͳÖÐÆðµ½Á˾Ù×ãÇáÖصÄ×÷Óá£ÔÚ×öIO²Ù×÷ʱ£¬ÐèÒª³¬Ê±»úÖƱ£Ö¤ÈÎÎñ²»´¦ÓÚÎÞÐÝÖ¹µÄµÈ´ý״̬£»ÔÚÑÓʱ´¦Àíʱ£¬¿ÉÒÔͨ¹ý“Äֱ픽øÐÐÏà¶Ô×¼µãµÄ»½ÐѲÙ×÷¡£ÔÚ¶àÈÎÎñ²Ù×÷ϵͳÖУ¬¶¨Ê±Æ÷ÊÇÒ»Öַdz£³£ÓõÄ×ÊÔ´¡£
¶ÔÓÚÊìϤӲ¼þµÄ¹¤³Ìʦ£¬¶¨Ê±Æ÷Ò»°ãÊÇоƬÖеÄÓ²¼þ¶¨Ê±Æ÷×ÊÔ´£¬Êµ¼ÊÉÏÔÚ²Ù×÷ϵͳÖÐÖ¸µÄ¶¨Ê±Æ÷×ÊÔ´²¢·Ç¾ÖÏÞÓÚÓ²¼þ×ÊÔ´£¬¸üÖØÒªµÄÊÇÈí¼þ¶¨Ê±Æ÷×ÊÔ´¡£Ó²¼þ¶¨Ê±Æ÷×ÊԴͨ³£ÊµÏÖ²Ù×÷ϵͳµÄÐÄÌø£¬ÔÚuc/osÖÐÐÄÌøƵÂÊĬÈÏֵΪ200Hz£¬Ò²¾ÍÊÇ5ms²úÉúÒ»´Î²Ù×÷ϵͳÐÄÌø¡£Èí¼þ¶¨Ê±Æ÷ÊÇÔÚ²Ù×÷ϵͳÐÄÌøµÄ»ù´¡ÉÏʵÏֵġ£
       ÏÂÃæ¶ÔLinuxÖеĶ¨Ê±Æ÷ʵÏÖËã·¨×÷Ïêϸ·ÖÎö¡£
 
LinuxÖж¨Ê±Æ÷µÄʵÏÖ
       LinuxÖеĶ¨Ê±Æ÷ʵÏÖÓеãÒâ˼£¬ÔÚ¶¨Ê±Æ÷½Ï¶àµÄÇé¿öÏÂʵÏÖЧÂʽϸߣ¬²¢ÇÒ¸ÃË㷨˼Ïë¿ÉÒÔÔÚÆäËüǶÈëʽϵͳÖеÃÒÔÓ¦Óá£
       ¶¨Ê±Æ÷ʵÏֵĺËÐÄ˼ÏëÊDzÉÓÃÁ˶༶hashÁ´±í£¬²¢ÇÒÿ¼¶hashµÄ³¤¶È¶¼²»Ò»Ñù£¬¶à¼¶hashÁ´±í¿ÉÒÔÀà±ÈΪÃë¡¢·Ö¡¢Ê±¡¢Ìì¡¢Ô£¬Ã¿¼¶µÄʱ¼ä¿ç¶È¶¼²»Ò»Ñù¡£LinuxÖÐʵÏÖµÄÎ弶hashÁ´±í¹ØϵÈçÏÂͼËùʾ£º
     ÈçÉÏͼËùʾΪ5¼¶hashÁ´±í£¬V1Ϊ×îµÍ²ãµÄhashÁ´±í£¬V5Ϊ×²ãµÄhashÁ´±í¡£V1~V5 hash tableµÄÿһÏîΪһÌõ¶¨Ê±Æ÷Á´±í£¬ÐÂÌí¼ÓµÄ¶¨Ê±Æ÷»áͨ¹ýexpire£¨¶¨Ê±Ê±¼äÖµ£©ºÍbase->timer_jiffies£¨µ±Ç°¶¨Ê±Öµ£©µÄ²îÖµexpire_timeÀ´Ë÷ÒýÓ¦¸Ã¹Ò½Óµ½ÄÄÒ»²ãhash tableÖУ¬²¢ÇÒË÷Òýµ½hash tableÖеľßÌåÏȻºó½«ÐÂÔö¼ÓµÄ¶¨Ê±Æ÷¼ÓÈëµ½¸ÃÏîµÄtimer listÖС£hash³¤¶È´ÓV1µ½V5±äµÃÔ½À´Ô½´ó¡£V1µÄhash³¤¶ÈΪ1¸öjiffies£¬Ò²¾ÍÊÇ˵V1µÄhash tableÿһÏîΪͬһjiffiesµÄ¶¨Ê±Æ÷Á´±í£»V5µÄhash³¤¶ÈΪ64M jiffies£¬Ò²¾ÍÊÇhash tableµÄÿһÏî»áÁ´½ÓÁ¬Ðø64M jiffies¶¨Ê±³¤¶ÈµÄtimer¡£²»Í¬²ã´ÎµÄhash table¾ßÓв»Í¬µÄhash³¤¶È£¬À뵱ǰʱ¼äµãÔ½Ô¶µÄtimerλÓÚhash³¤¶ÈÔ½³¤µÄtableÖУ¬ÒòΪÕâЩ¶¨Ê±Æ÷»¹ÐèÒªµÈ´ý½Ï³¤Ê±¼ä²ÅÄܵÃÒÔ´¦Àí£¬ËùÒÔ¿ÉÒÔ²ÉÓôó¿é·ÖÀàµÄ·½·¨£¬À뵱ǰʱ¼äµãÔ½½üµÄtimerÐèҪϸÁ£¶ÈµÄÇз֣¬ÒòΪjiffiesÿ±ä»¯Ò»´Î¶¼ÐèÒª´¦Àítimer£¬ËùÒÔ×îµÍ²ãµÄtable°´Ò»¸öjiffies½øÐÐÇз֡£Ëæ×Åʱ¼äµãµÄºóÒÆ£¬²»¶ÏµÄ¶Ô×îµ×²ãµÄhash table½øÐд¦Àí£¬²¢ÇÒͨ¹ýµ±Ç°Ê±¼äµãË÷ÒýÉϲãhash table£¬½«¶¨Ê±Æ÷·ÖÅ䵽ϼ¸¼¶µÄhash tableÖС£Ã¿


Ïà¹ØÎĵµ£º

Linux NFS ½éÉÜ

ÒÔÏÂÊǾ­¹ý´ÓÍøÉϻ㼯¶ø³É£¬ÏÂÃæµÄÁ¬½ÓµÄ½éÉÜÒ²ÊDZȽÏÏêϸ£º
http://linux.chinaunix.net/techdoc/net/2008/07/26/1020404.shtml
linux NFS ÅäÖò½Öè
 
 
linux NFS ÅäÖò½Öè
 
NFS server¿ÉÒÔ¿´×÷ÊÇÒ»¸öFILE SERVER,Ëü¿ÉÒÔÈÃÄãµÄPCͨ¹ýÍøÂ罫Զ¶ËµÃNFS SERVER¹²Ïí³öÀ´µÄµµ°¸MOUNTµ½×Ô¼ºµÄϵͳÖУ¬Ô ......

linuxȨÏÞÓëÎļþϵͳ°²È«

ȨÏÞÓëÎļþϵͳ°²È«
1,“ls -l”ÃüÁîÊä³ö½á¹ûÖи÷×ֶκ¬Ò壺
(1),ÎļþÀàÐÍ£¬µÚ1루“-”ÆÕͨÎļþ¡¢“d”Ŀ¼Îļþ¡¢“l”·ûºÅÁ´½ÓÎļþ¡¢“b”¿ìÉ豸Îļþ¡¢“c”×Ö·ûÉ豸Îļþ¡¢“p”¹ÜµÀÎļþ¡¢“s”socketÎļþ£©
(2),ȨÏÞ£¬µÚ2ÖÁ10루 ......

LinuxÏÂMP3¸èÇúÐÅÏ¢ÂÒÂëÖ®¼úÈ˽â¾ö·½°¸

תÔØ£º
ÏÖÔÚlinuxÏÂÓÐÔ½À´Ô½¶àµÄÓÅÐãµÄ²¥·ÅÈí¼þ£¬xmms£¬m-player£¬beep-media-player£¬totme£¬rhythmbox£¬µÈµÈµÈµÈ£¬µ«ÊÇÕâЩ²¥·ÅÈí¼þ¶¼²»ÄܺܺõĽâ¾ömp3ÎļþÖÐÎÄÐÅÏ¢ÂÒÂëµÄÎÊÌâ¡£
¾¿ÆäÔ­Òò£¬ÏÖÔÚÍøÉϾø´ó¶àÊý£¨99%ÒÔÉÏ£©µÄmp3¶¼ÊÇÍøÓÑÔÚwindowsÏÂѹÖƵģ¬ÎÄ×ÖÐÅÏ¢±àÂ뷽ʽ×ÔÈ»ÊÇGBK£¬µ½ÁËlinuxÏÂÃæ¾ÍûÓÐlftp ......

Linux»·¾³ÏÂÓÃcÓïÑÔдµÄ²¥·ÅwavÎļþµÄС³ÌÐò

#include <unistd.h>
#include <fcntl.h>
#include
<sys/types.h>
#include <sys/ioctl.h>
#include
<stdlib.h>
#include <stdio.h>
#include
<linux/soundcard.h>
/* ÏÂÃæµÄÈý¸ö²ÎÊýÊǸú¾ßÌåÎļþÏà¹ØµÄ£¬ÎļþʲôÑù£¬¾ÍÒªÉèÖóÉʲôÑù */
#define RATE 11025&nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ