Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±à³Ìʵս֮Îļþϵͳ±à³Ì

ÎÄÕÂÀ´Ô´£ºhttp://dev.yesky.com/468/7601968.shtml
2007-10-12 11:01×÷ÕߣºËᦻª³ö´¦£ºÌì¼«ÍøÈí¼þƵµÀÔðÈα༭£º·½ÖÛ
1.LinuxÎļþϵͳ
¡¡¡¡LinuxÖ§³Ö¶àÖÖÎļþϵͳ£¬Èçext¡¢ext2¡¢minix¡¢iso9660¡¢msdos¡¢fat¡¢vfat¡¢nfsµÈ¡£ÔÚÕâЩ¾ßÌåÎļþϵͳµÄÉϲ㣬LinuxÌṩÁËÐéÄâÎļþϵͳ£¨VFS£©À´Í³Ò»ËüÃǵÄÐÐΪ£¬ÐéÄâÎļþϵͳΪ ......

linuxÃüÁîÊÖ²á


 
·½±ãµÄlinuxÃüÁîÊÖ²á
 
À´Ô´: ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º 2006.07.24 00:31¡¡(¹²ÓÐ0ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
 
NO
·ÖÀà
PS1
ÃüÁîÃû
Ó÷¨¼°²ÎÊý
¹¦ÄÜ×¢½â
¶ÔÓ¦Õ½Ú
1
Îļþ¹ÜÀí
#
ls
ls -a
Áгöµ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþ£¬°üÀ¨ÒÔ.Í·µÄÒþº¬Îļþ
Îļþ¹ÜÀí
#
ls
ls -l»òll
Áгöµ±Ç°Ä¿Â¼ÏÂÎļþµÄÏêϸР......

Linux RPM

ÔÚLinux²Ù×÷ϵͳÖУ¬ÓÐÒ»¸öϵͳÈí¼þ°ü£¬ËüµÄ¹¦ÄÜÀàËÆÓÚWindowsÀïÃæµÄ“Ìí¼Ó/ɾ³ý³ÌÐò”£¬µ«Êǹ¦ÄÜÓֱȓÌí¼Ó/ɾ³ý³ÌÐò”Ç¿ºÜ¶à£¬Ëü¾ÍÊÇRed Hat Package Manager(¼ò³ÆRPM)¡£´Ë¹¤¾ß°ü×îÏÈÊÇÓÉRed Hat¹«Ë¾ÍƳöµÄ£¬ºóÀ´±»ÆäËûLinux¿ª·¢ÉÌËù½èÓá£ÓÉÓÚËüΪLinuxʹÓÃÕßʡȥÁ˺ܶàʱ¼ä£¬ËùÒÔ±»¹ã·ºÓ¦ÓÃÓÚÔÚLin ......

linuxÉèÖû·¾³±äÁ¿(ת)


1¡¢ÒýÑÔ
    ÔÚlinuxϵͳÏ£¬Èç¹ûÄãÏÂÔØ²¢°²×°ÁËÓ¦ÓóÌÐò£¬ºÜÓпÉÄÜÔÚ¼üÈëËüµÄÃû³ÆÊ±³öÏÖ“command not found”µÄÌáʾÄÚÈÝ¡£Èç¹ûÿ´Î¶¼µ½°²×°Ä¿±êÎļþ¼ÐÄÚ£¬ÕÒµ½¿ÉÖ´ÐÐÎļþÀ´½øÐвÙ×÷¾ÍÌ«·±ËöÁË¡£ÕâÉæ¼°µ½»·¾³±äÁ¿PATHµÄÉèÖÃÎÊÌ⣬¶øPATHµÄÉèÖÃÒ²ÊÇÔÚlinux϶¨ÖÆ»·¾³±äÁ¿µÄÒ»¸ö×é³É²¿·Ö¡£±¾ÎÄ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ