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

Linux µÄ¶àÏ̱߳à³ÌµÄ¸ßЧ¿ª·¢¾­Ñé

2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾­Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ºÍÒþ»ÞµÄ²î±ð¡£²»×¢ÒâÕâЩ Linux ÉϵÄһЩ¿ª·¢ÏÝÚ壬³£³£»áµ¼Ö³ÌÐòÎÊÌâ²»ÇËÀËø²»¶Ï¡£±¾ÎÄÖÐÎÒÃÇ´Ó 5 ¸ö·½Ãæ×ܽá³ö Linux ¶àÏ̱߳à³ÌÉϵÄÎÊÌ⣬²¢·Ö±ðÒý³öÏà¹Ø¸ÄÉƵĿª·¢¾­Ñ飬ÓÃÒÔ±ÜÃâÕâЩµÄÏÝÚå¡£ÎÒÃÇÏ£ÍûÕâЩ¾­Ñé¿ÉÒÔ°ïÖú¶ÁÕßÃÇÄܸüºÃ¸ü¿ìµÄÊìϤ Linux ƽ̨µÄ¶àÏ̱߳à³Ì¡£
ÎÒÃǼÙÉè¶ÁÕ߶¼ÒѾ­ºÜÊìϤ Linux ƽ̨ÉÏ»ù±¾µÄÏ̱߳à³ÌµÄ Pthread ¿â API ¡£ÆäËûµÄµÚÈý·½ÓÃÒÔÏ̱߳à³ÌµÄ¿â£¬Èç boost£¬½«²»»áÔÚ±¾ÎÄÖÐÌá¼°¡£±¾ÎÄÖÐÖ÷ÒªÉæ¼°µÄÌâ²Ä°üÀ¨Ï߳̿ª·¢ÖеÄÏ̹߳ÜÀí£¬»¥³â±äÁ¿£¬Ìõ¼þ±äÁ¿µÈ¡£½ø³Ì¸ÅÄ²»»áÔÚ±¾ÎÄÖÐÉæ¼°¡£
»ØÒ³Ê×
Linux ÉÏÏ߳̿ª·¢ API µÄ¸ÅÒª½éÉÜ
¶àÏ߳̿ª·¢ÔÚ Linux ƽ̨ÉÏÒѾ­ÓгÉÊìµÄ Pthread ¿âÖ§³Ö¡£ÆäÉæ¼°µÄ¶àÏ߳̿ª·¢µÄ×î»ù±¾¸ÅÄîÖ÷Òª°üº¬Èýµã£ºỊ̈߳¬»¥³âËø£¬Ìõ¼þ¡£ÆäÖУ¬Ï̲߳Ù×÷ÓÖ·ÖÏ̵߳Ĵ´½¨£¬Í˳ö£¬µÈ´ý 3 ÖÖ¡£»¥³âËøÔò°üÀ¨ 4 ÖÖ²Ù×÷£¬·Ö±ðÊÇ´´½¨£¬Ïú»Ù£¬¼ÓËøºÍ½âËø¡£Ìõ¼þ²Ù×÷ÓÐ 5 ÖÖ²Ù×÷£º´´½¨£¬Ïú»Ù£¬´¥·¢£¬¹ã²¥ºÍµÈ´ý¡£ÆäËûµÄһЩÏß³ÌÀ©Õ¹¸ÅÄÈçÐźŵƵȣ¬¶¼¿ÉÒÔͨ¹ýÉÏÃæµÄÈý¸ö»ù±¾ÔªËصĻù±¾²Ù×÷·â×°³öÀ´¡£
Ị̈߳¬»¥³âËø£¬Ìõ¼þÔÚ Linux ƽ̨É϶ÔÓ¦µÄ API ¿ÉÒÔÓñí 1 ¹éÄÉ¡£ÎªÁË·½±ãÊìϤ Windows Ï̱߳à³ÌµÄ¶ÁÕßÊìϤ Linux ¶àÏ߳̿ª·¢µÄ API£¬ÎÒÃÇÔÚ±íÖÐͬʱҲÁгö Windows SDK ¿âÖÐËù¶ÔÓ¦µÄ API Ãû³Æ¡£
±í 1. Ï̺߳¯ÊýÁбí
¶ÔÏó
²Ù×÷
Linux Pthread API
Windows SDK ¿â¶ÔÓ¦ API
Ïß³Ì
´´½¨
pthread_create
CreateThread
Í˳ö
pthread_exit
ThreadExit
µÈ´ý
pthread_join
WaitForSingleObject
»¥³âËø
´´½¨
pthread_mutex_init
CreateMutex
Ïú»Ù
pthread_mutex_destroy
CloseHandle
¼ÓËø
pthread_mutex_lock
WaitForSingleObject
½âËø
pthread_mutex_unlock
ReleaseMutex
Ìõ¼þ
´´½¨
pthread_cond_init
CreateEvent
Ïú»Ù
pthread_cond_destroy
CloseHandle
´¥·¢
pthread_cond_signal
SetEvent
¹ã²¥
pthread_cond_broadcast
SetEvent / ResetEvent
µÈ´ý
pthread_cond_wait / pthread_cond_timedwait
SingleObjectAndWait
¶àÏ߳̿ª·¢ÔÚ Linux


Ïà¹ØÎĵµ£º

linuxÆô¶¯¹ý³ÌdzÎö(3)


ÕâÊDZ¾ÎĵõÚÈý²¿·Ö,ÔÚÇ°Á½²¿·ÖÖÐ,ÎÒÒѾ­½²ÊöÁËLinux²Ù×÷ϵͳÊÇÈçºÎ±»»úÆ÷bootµ½,²¢ÇÒloadµ½Öƶ¨µÄÄÚ´æµØÖ·µÄ.ÎÒÃǽ«¼ÌÐøµÚ¶þ²¿·ÖµÄÄÚ
ÈÝ,¿´¿´²Ù×÷ϵͳÔÚÍê³ÉÁËbootsect.sºÍsetup.sµÄÔËÐкó,ÔÚhead.sÖÐ×öÁËЩʲô.
ÈÃÎÒÃÇ»ØÒäÒ»ÏÂ,ÔÚsetup.sÖÐ,ÎÒÃÇ°ÑÕû¸ösystemÄ£¿é´ÓµØÖ·0x10000³öÍùÏÂÒƶ¯ÁË0x10000µÄ¾àÀë,Ò²¾ÍÊÇ˵,ÏÖ ......

linuxÉ豸Çý¶¯Ñ§Ï°ÐèÒªÕÆÎյĻù´¡¼¼Êõ

      linuxÉ豸Çý¶¯µÄѧϰÊÇÒ»ÏîºÆ´óµÄ¹¤³Ì,¶ÁÕßÐèÒªÊ×ÏÈÕÆÎÕÒÔÏ»ù´¡:
 
1.Á¼ºÃµÄÓ²¼þ»ù´¡,¶®µÃSRAM,FLASH,SDRAM,Ó²Å̵ĶÁд·½Ê½,UART,I2C,USBµÈÉ豸½Ó    ¿Ú,ÂÖѯ,ÖжÏ,DMAµÄÔ­Àí,PCI×ÜÏߵŤ×÷·½Ê½ÒÔ¼°CPUµÄÄÚ´æ¹ÜÀíµ¥Ôª(MMU)µÈ.
 
2.Á¼ºÃµÄCÓïÑÔ»ù´¡,ÄÜÁé»îµØÔ ......

Oracleѧϰ±Ê¼Ç£ºlinuxÏÂÆôÍ£Oracle


1. linuxÏÂÆô¶¯oracle
su - oracle
sqlplus /nolog
conn /as sysdba
startup
exit
lsnrctl start
exit
2. linuxϹرÕoracle
su - oracle
sqlplus /nolog
conn /as sysdba
shutdown immediate
exit
lsnrctl stop
exit
3¡¢Æô¶¯¼àÌýÆ÷
oracle@suse92:~> lsnrctl start
4¡¢Í£Ö¹¼àÌýÆ÷
oracle@suse92:~ ......

±¾ÎĽ²ÊöÁËLinuxÃüÁîÐÐÐÞ¸ÄIP¡¢Íø¹Ø¡¢DNSµÄ·½·¨

·½Ê½Ò»£º
ifconfig eth0 192.168.1.18 netmask 255.255.255.0
˵Ã÷£º¸ÃÖÖ·½Ê½¿ÉÒÔʹ¸Ä±ä¼´Ê±ÉúЧ£¬ÖØÆôºó»á»Ö¸´ÎªÔ­À´µÄIP
·½Ê½¶þ£º
vi /etc/sysconfig/network-scripts/ifcfg-eth0
˵Ã÷£º¸Ã·½Ê½ÒªÖØÆôºóÉúЧ£¬ÇÒÊÇÓÀ¾ÃµÄ
Èç¹ûÒªÁ¢¼´¸ü¸ÄÇÒÓÀ¾ÃÉúЧ£¬¾ÍÖ»ÄÜÒÔÉÏÁ½ÖÖ·½Ê½Í¬Ê±Ê¹ÓÃÁË¡£
ÒÔÉÏÊÇͨ¹ýlinuxÃüÁîÐÐÐÞ¸ÄIPµÄ· ......

ΪÄã½âÎöLinuxÐéÄâ´æ´¢¹ÜÀí

Linux²Ù×÷ϵͳÊÇÒ»ÖÖ¶àÓû§¶àÈÎÎñ¡¢Ö§³Ö¶àÖÖƽ̨µÄ¿ªÔ´µÄÀàUnix²Ù×÷ϵͳ£¬ÆäÖ§³Ö¶àÖÖƽ̨£¬ÔÚ·þÎñ¶Ë¿ÉÓëÆäËüÉÌÓÃÀàUnixϵͳæÇÃÀ£¬ÔÚ¿Í»§¶ËÔòÏòWindowsϵÁз¢³öÁËÇ¿ÓÐÁ¦µÄÌôÕ½¡£×ÔLinuxµ®ÉúÒÔÀ´£¬·¢Õ¹Ñ¸ÃÍ£¬ÒѾ­Êܵ½ÁËÈ«Çò¿ªÔ´ÉçÇøºÍÐí¶àÉÌÒµ¿Æ¼¼¾ÞÍ·µÄ´óÁ¦Ö§³ÖÒÔ¼°Õþ¸®¡¢½ÌÓý»ú¹¹¡¢¿ÆÑе¥Î»µÄÖØÊÓ¡£±¾ÎĽéÉÜÁËLinuxÐéÄâ´æ´¢ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ