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

Linux¶àÏ̱߳à³Ì

Linux
¶àÏ̱߳à³Ì£º¡¾
http://fanqiang.chinaunix.net/a4/b8/20010811/0905001105.html
¡¿
    
Linux
¶àÏß³ÌÖ§³Ö
POSIX
Ï߳̽ӿڣ¬³ÆΪ
pthread,
    
pthread_create
ÓÃÀ´´´½¨Ị̈߳¬
pthread_join
µÈ´ýÏ߳̽áÊø£¬º¯ÊýµÄÔ­ÐÍ·Ö±ðÈçÏ£º
 
   
extern int pthread_create __P
((pthread_t *__thread, __const pthread_attr_t *__attr,
¡¡¡¡
void *(*__start_routine) (void *), void
*__arg));
 
extern int pthread_join __P
((pthread_t __th, void **__thread_return));
 
    
´´½¨Ïß³Ìʱ¿ÉÒÔ¸øÏß³ÌÉèÖÃÏà¹ØÊôÐÔ£¬¸ÃÊôÐÔ°üÀ¨ÉèÖÃÊÇ·ñ°ó¶¨£¬ÊÇ·ñ·ÖÀ룬¶ÑÕ»µØÖ·£¬¶ÑÕ»´óС£¬ÓÅÏȼ¶£¬Ä¬ÈϵÄÊôÐÔΪ·Ç°ó¶¨¡¢·Ç·ÖÀ롢ȱʡ
1M
µÄ¶ÑÕ»¡¢Ó븸½ø³ÌͬÑù¼¶±ðµÄÓÅÏȼ¶¡£
    
ÊôÐÔÏà¹ØµÄ½á¹¹ÌåÊÇ
pthread_attr_t
£¬³õʼ»¯º¯ÊýΪ
pthread_attr_init.
 
ÉèÖÃḬ̈߳ó¶¨×´Ì¬µÄº¯ÊýΪ
pthread_attr_setscope
£¬ËüÓÐÁ½¸ö²ÎÊý£¬µÚÒ»¸öÊÇÖ¸ÏòÊôÐԽṹµÄÖ¸Õ룬µÚ¶þ¸öÊÇ°ó¶¨ÀàÐÍ£¬ËüÓÐÁ½¸öÈ¡Öµ£º
PTHREAD_SCOPE_SYSTEM
£¨°ó¶¨µÄ£©ºÍ
PTHREAD_SCOPE_PROCESS
£¨·Ç°ó¶¨µÄ£©¡£
Ï̵߳ķÖÀë״̬¾ö¶¨Ò»¸öÏß³ÌÒÔʲôÑùµÄ·½Ê½À´ÖÕÖ¹×Ô¼º¡£ÔÚÉÏÃæµÄÀý×ÓÖУ¬ÎÒÃDzÉÓÃÁËÏ̵߳ÄĬÈÏÊôÐÔ£¬¼´Îª·Ç·ÖÀë״̬£¬ÕâÖÖÇé¿öÏ£¬Ô­ÓеÄÏ̵߳ȴý´´½¨µÄÏ߳̽áÊø¡£Ö»Óе±
pthread_join
£¨£©º¯Êý·µ»Øʱ£¬´´½¨µÄÏ̲߳ÅËãÖÕÖ¹£¬²ÅÄÜÊÍ·Å×Ô¼ºÕ¼ÓõÄϵͳ×ÊÔ´¡£¶ø·ÖÀëÏ̲߳»ÊÇÕâÑù×ӵģ¬ËüûÓб»ÆäËûµÄÏß³ÌËùµÈ´ý£¬×Ô¼ºÔËÐнáÊøÁË£¬Ïß³ÌÒ²¾ÍÖÕÖ¹ÁË£¬ÂíÉÏÊÍ·Åϵͳ×ÊÔ´¡£³ÌÐòÔ±Ó¦¸Ã¸ù¾Ý×Ô¼ºµÄÐèÒª£¬Ñ¡ÔñÊʵ±µÄ·ÖÀë״̬¡£ÉèÖÃÏ̷߳ÖÀë״̬µÄº¯ÊýΪ
pthread_attr_setdetachstate
£¨
pthread_attr_t *attr, int detachstate
£©¡£µÚ¶þ¸ö²ÎÊý¿ÉѡΪ
PTHREAD_CREATE_DETACHED
£¨·ÖÀëỊ̈߳©ºÍ
PTHREAD _CREATE_JOINABLE
£¨·Ç·ÖÀëỊ̈߳©¡£
 
Ïß³ÌÊý¾Ý
[TSD, Thread Specific Data]

Ïà¹ØµÄº¯ÊýÖ÷ÒªÓÐ
4
¸ö£º
´´½¨Ò»¸ö¼ü£»
Ϊһ¸ö¼üÖ¸¶¨Ïß³ÌÊý¾Ý£»
´ÓÒ»¸ö¼ü¶ÁÈ¡Ïß³ÌÊý¾Ý£»
ɾ³ý¼ü¡£
 
Ïß³Ìͬ²½£º
      
»¥³âËø£º
pthread_mutex_lock,pthread_mutex_unlock.
Ìõ¼þ±äÁ¿£º
l        
Ìõ¼þ±äÁ¿Í¨³£Ó뻥³âËøÒ»ÆðʹÓã¬ÓÃÀ´´òÆÆ»¥³


Ïà¹ØÎĵµ£º

ÓÃLinuxÏÂPerl½Å±¾Á¬½ÓSQLServer

×¼±¸¹¤×÷:
¡¡¡¡Óõ½µÄperl À©Õ¹×é¼þ(modules)ÔÚÉÏƪÌù³ö.( win32::odbc Ä£¿é
)ÏÂÔØ×é¼þºó°´ÕÕReadmeÎļþ°²×°µ¹ÏìӦĿ¼.ÅäÖúÃÏàÓ¦µÄodbcÊý¾ÝÔ´.
¡¡¡¡
¡¡¡¡³ÌÐòʵÏÖ:
¡¡¡¡Ê¹ÓÃ
¡¡¡¡use
Win32::ODBC;
¡¡¡¡
¡¡¡¡Óï¾ä°üº¬Ó¦Ê¹ÓõÄÄ£¿éÊÇwin32::odbc,д³öÊý¾Ý¿â
Á¬½Ó×Ö·û´®
¡¡¡¡
¡¡¡¡$DSN = "DSN =
My DSN ......

linux ubuntuÏÂftp·þÎñÆ÷°²×°¡¢ÅäÖÃÓëʹÓÃ

http://hi.baidu.com/vsgp/blog/item/0daae64589a3852fcffca3e7.html
1¡¢°²×°vsftpd
ÖÕ¶ËÊäÈ룺sudo apt-get install vsftpd
°²×°ÁËÖ®ºó»áÔÚ/home/Ͻ¨Á¢Ò»¸öftpĿ¼¡£ÕâʱºòÄã¿ÉÒÔÊÔ×Å·ÃÎÊÏÂftp://IPµØÖ·¡£Ó¦¸Ã¿ÉÒÔ¿´µ½Ò»¸ö¿Õ°×ÄÚÈݵÄftp¿Õ¼ä¡£
ÆôÓãºsudo /etc/init.d/vsftpd start
Í£Óãºsudo /etc/init.d/ ......

LinuxÄÚºËÖÐÓÃÓÚͬ²½µÄ¼¸ÖÖ»úÖƼ¯ÖÐÆðÀ´·ÖÎö

LinuxÄÚºËÖÐÓÃÓÚͬ²½µÄ¼¸ÖÖ»úÖƼ¯ÖÐÆðÀ´·ÖÎö£¬Ç¿µ÷ÁËËüÃÇÖ®¼äÔÚʵÏÖºÍʹÓÃÉϵIJ»Í¬¡£
¡¡¡¡Í¬²½Í¨³£ÊÇΪÁË´ïµ½¶àÏß³ÌЭͬµÄÄ¿µÄ¶øÉè¼ÆµÄÒ»ÖÖ»úÖÆ£¬Í¨³£°üº¬Òì²½ÐźŻúÖƺͻ¥³â»úÖÆ×÷ΪÆäʵÏֵĵײ㡣ÔÚLinux 2.4ÄÚºËÖÐÒ²ÓÐÏàÓ¦µÄ¼¼ÊõʵÏÖ£¬°üÀ¨ÐźÅÁ¿¡¢×ÔÐýËø¡¢Ô­×Ó²Ù×÷ºÍµÈ´ý¶ÓÁУ¬ÆäÖÐÔ­×Ó²Ù×÷ºÍµÈ´ý¶ÓÁÐÓÖÊÇʵÏÖÐźÅÁ¿µÄ ......

Linux²é¿´Ó²¼þÐÅÏ¢ÃüÁî

Linux²é¿´Ó²¼þÐÅÏ¢ÃüÁî
1.²é¿´CPUÐÅÏ¢
cat /proc/cpuinfo
2.²é¿´ÄÚ´æÐÅÏ¢
cat /proc/meminfo
free
vmstat
3.²é¿´Ó²ÅÌÐÅÏ¢
fdisk -l
df -lh
4.²é¿´Äں˰汾ÐÅÏ¢
cat /proc/version
uname -r
lsb_release -a
5.²é¿´ÎļþÕ¼Óÿռä
du
6.²é¿´ÏµÍ³ÐÅÏ¢
dmesg
7.²é¿´¶Ë¿ÚÐÅÏ¢
netstat
8.²é¿´32λ»¹ÊÇ64λ
ge ......

linux ping ÃüÁîÏê½â





¹¦ÄÜ˵Ã÷£º¼ì²âÖ÷»ú¡£
Óï¡¡¡¡·¨£ºping
[-dfnqrRv][-c<Íê³É´ÎÊý>][-i<¼ä¸ôÃëÊý>][-I<ÍøÂç½çÃæ>][-l<Ç°ÖÃÔØ
Èë>][-p<·¶±¾Ñùʽ>][-s<Êý¾Ý°ü´óС>][-t<´æ»îÊýÖµ>][Ö÷»úÃû³Æ»òIPµØÖ·]
²¹³ä˵Ã÷£ºÖ´ÐÐpingÖ¸Áî»áʹÓÃICMP´«ÊäЭÒ飬·¢³öÒªÇó»ØÓ¦µÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ