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

Windows ºÍ Linux µÄIPC API¶ÔÓ¦±í

Windows ºÍ Linux µÄIPC API¶ÔÓ¦±í
 
 
Table 1. Process mapping
Windows
Linux
Classification
CreateProcess()
CreateProcessAsUser()
fork()
setuid()
exec()
Mappable
TerminateProcess()
kill()
Mappable
SetThreadpriority()
GetThreadPriority()
Setpriority()
getPriority()
Mappable
GetCurrentProcessID()
getpid()
Mappable
Exitprocess()
exit()
Mappable
WaitForSingleObjec()
WaitForMultipleObject()
GetExitCodeProcess()
waitpid()
¡ùUsing Sys V semaphores, WaitForSingleObjec/MultipleObject
can be implemented
Context specific
GetEnvironmentVariable
SetEnvironmentVariable
getenv()
setenv()
Mappable
 
 
Table 2. Thread mapping
Windows
Linux
Classification
CreateThread
pthread_create
pthread_attr_init
pthread_attr_setstacksize
pthread_attr_destroy
Mappable
ThreadExit
pthread_exit
Mappable
WaitForSingleObject
pthread_join
pthread_attr_setdetachstate
pthread_detach
Mappable
SetPriorityClass
SetThreadPriority
setpriority
sched_setscheduler
sched_setparam
pthread_setschedparam
pthread_setschedpolicy
pthread_attr_setschedparam
pthread_attr_setschedpolicy
Context Specific
 
 
Table 3. Synchronization mapping
Windows
Linux -- threads
Linux -- process
Mutex
Mutex - pthread library
System V semaphores
Critical section
Mutex - pthread library
Not applicable as critical sections are used only between the threads of the same process
Semaphore
Conditional Variable with mutex - pthreads
POSIX semaphores
System V Semaphores
Event
Conditional Variable with mutex - pthreads
System V Semaphores
 
 
Table 4. Semaphore mapping
Windows
Linux Threads
Linux Process
Classification
CreateSemaphore
sem_init
semget
semctl
Context specific
OpenSemaphore
Not applicable
semget
Context specific
WaitForSingleObject
sem_wait
sem_trywait
semop
Context specific
ReleaseSemaphore
sem_post
semop
Context specific
CloseHandle
sem_destroy
semctl
Context specific


Ïà¹ØÎĵµ£º

linux c socket ¿ª·¢Óë±àÒëʵÀý

ÕâÆªÈÕÖ¾»¹ÊÇÏÈ´ÓÒ»¸öÄܹ»ÔËÐÐÆðÀ´µÄÀý×Ó³ö·¢£¬Ò»µ©ÄÜ˳ÀûµÄ¿´µ½³ÌÐòµÄ³É¹¦ÔËÐУ¬ÄÇô½ÓÏÂÀ´µÄʼþÎÒÏëÓ¦¸ÃÊÇÎÊΪʲôÁË£¿ËƺõÕâÑù¸ü¼ÓÈÝÒ×Àí½âºÍÕÆÎÕ¡£
¶ÔÓÚsocket³ÌÐòµÄ¸ÅÄîÕâÀï¾Í²»¶àдÁË£¬µ«ÎÒÏàÐÅ£¬Èç¹ûÄÜ¿´ÍêÕâÕûƪÎÄÕ£¬ÎÒÏàÐŲ»»áÔÙÓÐÕâÑùµÄÒÉÎʵġ£
ÏÂÃæ½«±àдһ¸öc/s½á¹¹µÄ³ÌÐò£¬Ö÷Òª¹¦ÄÜÊÇclient½«Ïòserver·¢Ë ......

¹ØÓÚlinux»·¾³±äÁ¿Îļþ

etc/profile:´ËÎļþΪϵͳµÄÿ¸öÓû§ÉèÖû·¾³ÐÅÏ¢,µ±Óû§µÚÒ»´ÎµÇ¼ʱ,¸ÃÎļþ±»Ö´ÐÐ.
²¢´Ó/etc/profile.dĿ¼µÄÅäÖÃÎļþÖÐËѼ¯shellµÄÉèÖÃ.
/etc/bashrc:Ϊÿһ¸öÔËÐÐbash shellµÄÓû§Ö´ÐдËÎļþ.µ±bash shell±»´ò¿ªÊ±,¸ÃÎļþ±»¶ÁÈ¡.
~/.bash_profile:ÿ¸öÓû§¶¼¿ÉʹÓøÃÎļþÊäÈëרÓÃÓÚ×Ô¼ºÊ¹ÓõÄshellÐÅÏ¢,µ±Óû§µÇ¼ʱ ......

linuxÏÂrar¸ñʽÎļþ½âѹ·½·¨£¨ubuntu9ϲËÄñ¼¶·½·¨£©

×î½ü¸Õ½Ó´¥linux £¬¶ÔÕâ¸öϵͳÊÇÒ»µã¶¼²»Á˽⣬µ«ÊÇÓÉÓÚÍøÉÏÏÂÔØµÄ×ÊÔ´¶àÊÇ.rar¸ñʽµÄ£¬ËùÒÔÈçºÎ½âѹÕâ¸öÎļþÊÇÎÒÓöµ½µÄÒ»¸öÄÑÌâ¡£
ÔÚÍøÉÏËÑÁËЩÏà¹Ø·½·¨£¬Ô­ÎÄÈçÏ£º
LinuxϵͳÖÐrar¡¢unrarÃüÁî°²×°ºÍʹÓÃÏê½â
×÷Õß:Van<hexinghe@hotmail.com>
˵Ã÷£ºÓÉÓÚ±¾ÈËˮƽÓÐÏÞ£¬ÄÑÃâÓдíÎóÖ®´¦¡£»¶Ó­×ªÔØ£¬µ«Çë×¢Ã÷×÷ÕßÐ ......

ÉîÈë·ÖÎö Linux ÄÚºËÁ´±í


ÉîÈë·ÖÎö Linux ÄÚºËÁ´±í
 
 
¼¶±ð£º ³õ¼¶
ÑîɳÖÞ (pubb@163.net)¹ú·À¿Æ¼¼´óѧ¼ÆËã»úѧԺ
2004 Äê 8 ÔÂ 01 ÈÕ
±¾ÎÄÏêϸ·ÖÎöÁË 2.6.x ÄÚºËÖÐÁ´±í½á¹¹µÄʵÏÖ£¬²¢Í¨¹ýʵÀý¶Ôÿ¸öÁ´±í²Ù×÷½Ó¿Ú½øÐÐÁËÏ꾡µÄ½²½â¡£
Ò»¡¢ Á´±íÊý¾Ý½á¹¹¼ò½é
Á´±íÊÇÒ»ÖÖ³£ÓõÄ×éÖ¯ÓÐÐòÊý¾ÝµÄÊý¾Ý½á¹¹£¬Ëüͨ¹ýÖ¸Õ뽫һϵÁÐÊý¾Ý½Úµ ......

linux ²é¿´Îļþ¼Ð´óС

du -sh * ²é¿´µ±Ç°Ä¿Â¼ÏµÄÎļþ¼Ð´óС
du ÃüÁî
ÓÃ;
¸ÅÊö´ÅÅÌʹÓá£
Óï·¨
du [ -a | -s ] [ -k ] [ -m ] [ -g ][ -l ] [ -r ] [ -x ] [ -H | -L ][ File ... ]
ÃèÊö
duÃüÁîÏÔʾÓÃÓÚÎļþµÄ¿éµÄÊýÁ¿¡£
Èç¹ûÖ¸¶¨µÄFile²ÎÊýʵ¼ÊÉÏÊÇÒ»¸öĿ¼£¬¾ÍÒª±¨¸æ¸ÃĿ¼ÄÚµÄËùÓÐÎļþ¡£Èç¹ûûÓÐÌṩ File²ÎÊý£¬duÃüÁîʹÓõ±Ç°Ä¿Â¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ