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

LinuxÐźÅÁ¿Ï߳̿ØÖÆ

 Ïß³ÌÖл¥³âËøµÄʹÓ㬴ﵽ¶Ô¹²Ïí×ÊÔ´»¥³âʹÓᣳýÁËʹÓû¥³âËø£¬ÐźÅÁ¿£¬Ò²¾ÍÊDzÙ×÷ϵͳÖÐËùÌáµ½µÄPVÔ­ÓÄÜ´ïµ½»¥³âºÍͬ²½µÄЧ¹û£¬Õâ¾ÍÊǽñÌìÎÒÃÇËùÒª½²ÊöµÄÐźÅÁ¿Ï߳̿ØÖÆ¡£
PVÔ­ÓïÊǶÔÕûÊý¼ÆÊýÆ÷ÐźÅÁ¿semµÄ²Ù×÷£¬Ò»´ÎP²Ù×÷¿Éʹsem¼õÒ»£¬¶øÒ»´ÎV²Ù×÷¿ÉÊÇsem¼ÓÒ»¡£½ø³Ì£¨»òỊ̈߳©¸ù¾ÝÐźÅÁ¿µÄÖµÀ´ÅжÏÊÇ·ñ¶Ô¹«¹²×ÊÔ´¾ßÓзÃÎÊȨÏÞ¡£µ±ÐźÅÁ¿µÄÖµ´óÓÚÁã»òµÈÓÚÁãµÄʱºò£¬¸Ã½ø³Ì£¨»òỊ̈߳©¾ßÓжԹ«¹²×ÊÔ´·ÃÎʵÄȨÏÞ£¬·ñÔò£¬µ±ÐźÅÁ¿µÄֵСÓÚʱ£¬¸Ã½ø³Ì£¨»òỊ̈߳©¾Í»á±»×èÈû£¬Ö±µ½ÐźÅÁ¿µÄÖµ´óÓÚ»òµÈÓÚÒ»¡£
1¡¢ÔÚLINUXÖУ¬ÊµÏÖÁËPOSIXµÄÎÞÃûÐźÅÁ¿£¬Ö÷ÒªÓÃÓÚÏ̼߳äµÄ»¥³âͬ²½£¬ÏÂÃ潫¼òµ¥½éÉÜһЩº¯Êý½Ó¿Ú£º
£¨1£©¡¢sem_init
¹¦ÄÜ£º         ÓÃÓÚ´´½¨Ò»¸öÐźÅÁ¿£¬²¢³õʼ»¯ÐźÅÁ¿µÄÖµ¡£
Í·Îļþ£º       <semaphore.h>
º¯ÊýÔ­ÐÍ£º     int sem_init (sem_t* sem, int pshared, unsigned int value);
º¯Êý´«ÈëÖµ£º   sem:ÐźÅÁ¿¡£
                   pshared:¾ö¶¨ÐźÅÁ¿ÄÜ·ñÔÚ¼¸¸ö½ø³Ì¼ä¹²Ïí¡£ÓÉÓÚÄ¿Ç°LINUX»¹Ã»ÓÐʵÏÖ½ø
                               ³Ì¼ä¹²ÏíÐÅÏ¢Á¿£¬ËùÒÔÕâ¸öÖµÖ»ÄÜÈ¡0¡£
º¯Êý·µ»ØÖµ£º   0£º³É¹¦¡£
                   -1£ºÊ§°Ü¡£
£¨2£©ÆäËûº¯Êý¡£
int sem_wait       (sem_t* sem);
int sem_trywait   (sem_t* sem);
int sem_post       (sem_t* sem);
int sem_getvalue (sem_t* sem);
int sem_destroy   (sem_t* sem);
¹¦ÄÜ£ºsem_waitºÍsem_trywaitÏ൱ÓÚP²Ù×÷£¬ËüÃǶ¼Äܽ«ÐźÅÁ¿µÄÖµ¼õÒ»£¬Á½ÕßµÄÇø±ðÔÚ
        ÓÚÈôÐźÅÁ¿µÄֵСÓÚÁãʱ£¬sem_wait½«»á×èÈû½ø³Ì£¬¶øsem_trywaitÔò»áÁ¢¼´·µ»Ø¡£
        sem_postÏ൱ÓÚV²Ù×÷£¬Ëü½«ÐźÅÁ¿µÄÖµ¼ÓÒ»£¬Í¬Ê±·¢³


Ïà¹ØÎĵµ£º

linuxÏÂviÃüÁî´óÈ«

linuxÏÂviÃüÁî´óÈ«
ĬÈÏ·ÖÀà   2009-04-12 14:59   ÔĶÁ1663   ÆÀÂÛ2  
×ֺţº ´ó´ó  ÖÐÖР СС
Îı¾±à¼­Æ÷ÊÇËùÓмÆËã»úϵͳÖÐ×î³£ÓõÄÒ»ÖÖ¹¤¾ß¡£Ê¹ÓÃ×îΪ¹ã·ºµÄÊÇvi£¬¶øviÃüÁî·±¶à£¬¸÷´óÂÛ̳»ù±¾É϶¼ÓÐ×ܽᣡΪÁË´ó¼Òѧϰ·½±ã£¬Çë×ÔÓÉת·¢!   &nb ......

linux ÃüÁî

linux ¹ÒÔØÃüÁî : Mount 
http://www.zhiweinet.com/jiaocheng/2009-02/2602.htm
 
mount¹ÒÔØÃüÁîʹÓ÷½·¨:
 
mount -t ÀàÐÍ -o ¹Ò½Ó·½Ê½ Ô´ Ä¿±ê
 
-t ÏêϸѡÏî
¡¡¡¡¹âÅÌ»ò¹âÅ̾µÏñ£ºiso9660
DOS fat16Îļþϵͳ£ºmsdos
¡¡¡¡Windows 9x fat32Îļþϵͳ£ºvfat
¡¡¡¡Windows NT ntfsÎļþϵͳ£ºn ......

LinuxʵÑ鱨¸æ4

 LinuxʵÑ鱨¸æ4
ÎÒµÄ×÷Òµ   2009-11ÔÂ11
ʵÑ飺ÎļþȨÏÞ¼°Óû§¹ÜÀí
ÐÕ    Ãû
 ÕÅ¿­
 
ÈονÌʦ
 
³ÂѩƼ
 
Ö¸µ¼½Ìʦ
 
³ÂѩƼ
 
ʵÑéµØµã
 
B203
 
ʵÑéʱ¼ä
 
2009Äê11ÔÂ11ÐÇÆÚ ¶þ
 
Ò»¡¢ÊµÑéÄ¿µÄ
 
ÒªÇ ......

Linux mmap

LinuxÌṩÁËÄÚ´æÓ³É亯Êýmmap, Ëü°ÑÎļþÄÚÈÝÓ³Éäµ½Ò»¶ÎÄÚ´æÉÏ(׼ȷ˵ÊÇÐéÄâÄÚ´æÉÏ), ͨ¹ý¶ÔÕâ¶ÎÄÚ´æµÄ¶ÁÈ¡ºÍÐÞ¸Ä, ʵÏÖ¶ÔÎļþµÄ¶ÁÈ¡ºÍÐÞ¸Ä, ÏÈÀ´¿´Ò»ÏÂmmapµÄº¯ÊýÉùÃ÷: Í·Îļþ: Ô­ÐÍ: void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offsize); ·µ» ......

LinuxÍøÂç»ù±¾ÍøÂçÅäÖÃ

 ÍøÂçÐÅÏ¢²é¿´
²é¿´Íø·½Ó¿ÚÐÅÏ¢
1£®Á˽âlinuxÖеÄÍøÂç½Ó¿ÚÉ豸
$/sbin/ifconfig                               ²é¿´ËùÓлÍøÂç½Ó¿ÚÐÅÏ¢£¬ÆäÖаüÀ¨Ò»¸ölo»·»Ø¶Ë¿Ú¡£
2£®²é¿´Ö¸¶¨ÍøÂç½Ó¿ÚµÄÐÅÏ¢
$/sbin/ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ