linux É豸½ÚµãÏêϸ½éÉÜ
LinuxÉ豸Îļþ¼ò½é
LinuxÉ豸Îļþ¼ò½é
¸ÅÊö
É豸¹ÜÀíÊÇlinuxÖбȽϻù´¡µÄ¶«Î÷£¬µ«ÊÇÓÉÓÚLinuxÖÇÄ̶ܳȵÄÔ½À´Ô½¸ß£¬UdevµÄʹÓÃÔ½À´Ô½¹ã·º£¬Ê¹µÃÔ½À´Ô½¶àµÄLinuxÐÂÓû§¶Ô /dev Ŀ¼ÏµĶ«Î÷±äµÃ²»ÔÙÊìϤ¡£ÓÐʱºòÓö¼ûÎÊÌâ¾Í»á±äµÃ×¥¿ñ¡£
Linux ÖеÄÉ豸ÓÐ2ÖÖÀàÐÍ£º×Ö·ûÉ豸(ÎÞ»º³åÇÒÖ»ÄÜ˳Ðò´æÈ¡)¡¢¿éÉ豸(Óлº³åÇÒ¿ÉÒÔËæ»ú´æÈ¡)¡£Ã¿¸ö×Ö·ûÉ豸ºÍ¿éÉ豸¶¼±ØÐëÓÐÖ÷¡¢´ÎÉ豸ºÅ£¬Ö÷É豸ºÅÏàͬµÄÉ豸ÊÇͬÀàÉ豸(ʹÓÃͬһ¸öÇý¶¯³ÌÐò)¡£ÕâЩÉ豸ÖУ¬ÓÐЩÉ豸ÊǶÔʵ¼Ê´æÔÚµÄÎïÀíÓ²¼þµÄ³éÏ󣬶øÓÐЩÉ豸ÔòÊÇÄÚºË×ÔÉíÌṩµÄ¹¦ÄÜ(²»ÒÀÀµÓÚÌض¨µÄÎïÀíÓ²¼þ£¬ÓÖ³ÆΪ"ÐéÄâÉ豸")¡£Ã¿¸öÉ豸ÔÚ /dev Ŀ¼Ï¶¼ÓÐÒ»¸ö¶ÔÓ¦µÄÎļþ(½Úµã)¡£¿ÉÒÔͨ¹ý cat /proc/devices ÃüÁî²é¿´µ±Ç°ÒѾ¼ÓÔصÄÉ豸Çý¶¯³ÌÐòµÄÖ÷É豸ºÅ¡£ÄÚºËÄܹ»Ê¶±ðµÄËùÓÐÉ豸¶¼¼Ç¼ÔÚÔÂëÊ÷Ï嵀 Documentation/devices.txt ÎļþÖС£ÔÚ /dev Ŀ¼Ï³ýÁË×Ö·ûÉ豸ºÍ¿éÉ豸½ÚµãÖ®Í⻹ͨ³£»¹»á´æÔÚ£ºFIFO¹ÜµÀ¡¢Socket¡¢Èí/Ó²Á¬½Ó¡¢Ä¿Â¼¡£ÕâЩ¶«Î÷ûÓÐÖ÷/´ÎÉ豸ºÅ¡£
É豸Îļþ
LinuxÄÚºËËùÄÜʶ±ðµÄËùÓÐÉ豸¶¼¼Ç¼ÔÚ
http://www.lanana.org/docs/device-list/
¶øÄÚºËÔÂëÊ÷ÖÐµÄ Documentation/devices.txt ¿ÉÄܲ»ÊÇ×îа汾¡£
Á˽âÕâЩÉ豸µÄ×î»ù±¾ÒªÇó¾ÍÊǶÔÿ¸öÉ豸ÎļþµÄº¬ÒåÁËÈçÖ¸ÕÆ£¬ÏÂÃæÁгö³£¼ûµÄÉ豸ÎļþÒÔ¼°ÏàÓ¦µÄº¬Òå(±È½ÏƫƧµÄ¾ÍÊ¡ÂÔÁË)¡£
----------------------------------------------------------------------
Ö÷É豸ºÅ É豸ÀàÐÍ
´ÎÉ豸ºÅ=ÎļþÃû ¼òҪ˵Ã÷
----------------------------------------------------------------------
0 δÃüÃûÉ豸(ÀýÈ磺¹ÒÔصķÇÉ豸)
0 = Ϊ¿ÕÉ豸ºÅ±£Áô
1 char ÄÚ´æÉ豸
1 = /dev/mem Ö±½Ó´æÈ¡ÎïÀíÄÚ´æ
2 = /dev/kmem ´æÈ¡¾¹ýÄÚºËÐéÄâÖ®ºóµÄÄÚ´æ
3 = /dev/null ¿ÕÉ豸¡£ÈκÎдÈ붼½«±»Ö±½Ó¶ªÆú£¬ÈκζÁÈ¡¶¼½«µÃµ½EOF¡£
4 = /dev/port ´æÈ¡ I/O ¶Ë¿Ú
5 = /dev/zero Áã×Ö½ÚÔ´£¬Ö»ÄܶÁÈ¡µ½ÎÞÏÞ¶àµÄÁã×Ö½Ú¡£
7 = /dev/full ÂúÉ豸¡£ÈκÎдÈ붼½«Ê§°Ü£¬²¢°ÑerrnoÉèΪENOSPCÒÔ±íʾûÓÐÊ£Óà¿Õ¼ä¡£
8 = /dev/random Ëæ»úÊý·¢ÉúÆ÷¡£ÍêÈ«ÓÉÓû§µÄÊäÈëÀ´²úÉúËæ»úÊý¡£
Èç¹ûÓû§Í£Ö¹ËùÓж¯×÷£¬ÔòÍ£Ö¹²úÉúеÄËæ»úÊý¡£
9 = /dev/urandom ¸ü¿ì£¬µ«ÊDz»¹»°²È«µÄËæ»úÊý·¢ÉúÆ÷¡£¾¡¿ÉÄÜÓÉÓû§µÄÊäÈëÀ´²úÉúËæ»úÊý£¬
Èç¹ûÓû§Í£Ö¹ËùÓж¯×÷£¬Ôò°
Ïà¹ØÎĵµ£º
×÷Õߣº
±±ÄÏÄϱ±£¬ÕýÔÚÔö¼ÓÖÐ... ... ÐèÒªÄúµÄ²ÎÓ룻
À´×Ô£º
LinuxSir.Org
¼ò½é£º
±¾ÎÄÖ»Êǽ²Ò»½²ÎÒÃÇ×î³£ÓõÄLinuxÓëWindows¹²ÏíÎļþ£¬Ö÷ÒªÊÇΪÐÂÊÖָһָ·¡£ÈçºÎ½¨Á¢×î¼òµ¥µÄSamba·þÎñÆ÷£¬²¢½²ÊöÓöµ½ÎÊÌâÓ¦¸Ã´ÓºÎ´¦Ñ°ÕÒ½â¾ö·½°¸£»ÕýÔÚ¸üÐÂÖ®ÖУ¬Ï£ÍûÄúµÄ²Î¼Ó ... ... лл£»
Ŀ¼
0.1 ²é¿´Îļþ ......
½ø³Ì
½ø³ÌµÄÌØÐÔ£º
¶ÀÁ¢ÐÔ¡¢¶à̬ÐÔ¡¢²¢·¢ÐÔ¡£
²¢·¢ÐԺͶദÀí»ú²¢ÐÐÊÇÁ½¸ö²»Í¬µÄ¸ÅÄî¡£²¢ÐÐÖ¸ÔÚͬһʱ¿ÌÄÚ£¬ÓжàÌõÖ¸ÁîÔÚ¶à¸ö´¦Àí»úÉÏͬʱִÐУ¬¶ø²¢·¢Ö¸ÔÚͬһʱ¿ÌÄÚ¿ÉÄÜÖ»ÓÐÒ»ÌõÖ¸ÁîÖ´ÐУ¬µ«¶à¸ö½ø³ÌµÄÖ¸Áî±»¿ìËÙÂÖ»»Ö´ÐУ¬Ê¹µÃÔÚºê¹ÛÉϾßÓжà¸ö½ø³ÌͬʱִÐеÄЧ¹û¡£
Ò»°ãµÄ£¬½ø³ÌµÄ3ÖÖ״̬£º
¾ÍÐ÷̬¡¢×èÈû̬¡¢ÔËÐÐÌ ......
Ò»¡¢ ʲôÊÇϵͳµ÷ÓÃ
ÔÚLinuxµÄÊÀ½çÀÎÒÃǾ³£»áÓöµ½ÏµÍ³µ÷ÓÃÕâÒ»ÊõÓËùνϵͳµ÷Ó㬾ÍÊÇÄÚºËÌṩµÄ¡¢¹¦ÄÜÊ®·ÖÇ¿´óµÄһϵÁеĺ¯Êý¡£ÕâЩϵͳµ÷ÓÃÊÇÔÚÄÚºËÖÐʵÏֵģ¬ÔÙͨ¹ýÒ»¶¨µÄ·½Ê½°Ñϵͳµ÷ÓøøÓû§£¬Ò»°ã¶¼Í¨¹ýÃÅ(gate)ÏÝÈë(trap)ʵÏÖ¡£ÏµÍ³µ÷ÓÃÊÇÓû§³ÌÐòºÍÄں˽»»¥µÄ½Ó¿Ú¡£
¶þ¡¢ ϵͳµ÷ÓõÄ×÷Ó ......
KS2009: How Google uses Linux
By Jonathan Corbet
October 21, 2009
LWN's 2009 Kernel Summit coverage
There may be no single organization which runs more Linux systems than Google. But the kernel development community knows little about how Google uses Linux and what sort of problems are ......