¶Ô±È£ºLinuxºÍWindowsϵͳÏ̼߳äµÄÇø±ð
¶Ô±È£ºLinuxºÍWindowsϵͳÏ̼߳äµÄÇø±ð
ÊìϤWIN32±à³ÌµÄÈËÒ»¶¨ÖªµÀ£¬WIN32µÄ½ø³Ì¹ÜÀí·½Ê½ÓëLinuxÉÏÓÐןܴóÇø±ð£¬ÔÚUNIXÀֻÓнø³ÌµÄ¸ÅÄµ«ÔÚWIN32ÀïÈ´»¹ÓÐÒ»¸ö"Ïß³Ì"µÄ¸ÅÄÄÇôLinuxºÍWIN32ÔÚÕâÀ﾿¾¹ÓÐ×ÅʲôÇø±ðÄØ£¿
WIN32ÀïµÄ½ø³Ì/Ïß³ÌÊǼ̳Ð×ÔOS/2µÄ¡£ÔÚWIN32À"½ø³Ì"ÊÇÖ¸Ò»¸ö³ÌÐò£¬¶ø"Ïß³Ì"ÊÇÒ»¸ö"½ø³Ì"ÀïµÄÒ»¸öÖ´ÐÐ"ÏßË÷"¡£´ÓºËÐÄÉϽ²£¬ WIN32µÄ¶à½ø³ÌÓëLinux²¢ÎÞ¶à´óµÄÇø±ð£¬ÔÚWIN32ÀïµÄÏ̲߳ÅÏ൱ÓÚLinuxµÄ½ø³Ì£¬ÊÇÒ»¸öʵ¼ÊÕýÔÚÖ´ÐеĴúÂë¡£µ«ÊÇ£¬WIN32Àïͬһ¸ö½ø³ÌÀï¸÷¸öÏß³ÌÖ®¼äÊǹ²ÏíÊý¾Ý¶ÎµÄ¡£Õâ²ÅÊÇÓëLinuxµÄ½ø³Ì×î´óµÄ²»Í¬¡£
ÏÂÃæÕâ¶Î³ÌÐòÏÔʾÁËWIN32ÏÂÒ»¸ö½ø³ÌÈçºÎÆô¶¯Ò»¸öÏ̡߳£
int g;
DWORD WINAPI ChildProcess( LPVOID lpParameter ){
int i;
for ( i = 1; i <1000; i ++) {
g ++;
printf( "This is Child Thread: %d\n", g );
}
ExitThread( 0 );
};
void main()
{
int threadID;
int i;
g = 0;
CreateThread( NULL, 0, ChildProcess, NULL, 0, &threadID );
for ( i = 1; i <1000; i ++) {
g ++;
printf( "This is Parent Thread: %d\n", g );
}
}
ÔÚWIN32Ï£¬Ê¹ÓÃCreateThreadº¯Êý´´½¨Ị̈߳¬ÓëLinuxÏ´´½¨½ø³Ì²»Í¬£¬WIN32Ï̲߳»ÊÇ´Ó´´½¨´¦¿ªÊ¼ÔËÐеģ¬¶øÊÇÓÉ CreateThreadÖ¸¶¨Ò»¸öº¯Êý£¬Ï߳̾ʹÓÄǸöº¯Êý´¦¿ªÊ¼ÔËÐС£´Ë³ÌÐòͬǰÃæµÄUNIX³ÌÐòÒ»Ñù£¬ÓÉÁ½¸öÏ̸߳÷´òÓ¡1000ÌõÐÅÏ¢¡£ threadIDÊÇ×ÓÏ̵߳ÄÏ̺߳ţ¬ÁíÍ⣬ȫ¾Ö±äÁ¿gÊÇ×ÓÏß³ÌÓ븸Ï̹߳²ÏíµÄ£¬Õâ¾ÍÊÇÓëLinux×î´óµÄ²»Í¬Ö®´¦¡£´ó¼Ò¿ÉÒÔ¿´³ö£¬WIN32µÄ½ø³Ì/Ïß³ÌÒª±ÈLinux¸´ÔÓ£¬ÔÚLinuxҪʵÏÖÀàËÆWIN32µÄÏ̲߳¢²»ÄÑ£¬Ö»ÒªforkÒÔºó£¬ÈÃ×Ó½ø³Ìµ÷ÓÃThreadProcº¯Êý£¬²¢ÇÒΪȫ¾Ö±äÁ¿¿ªÉè¹²ÏíÊý¾ÝÇø¾ÍÐÐÁË£¬µ«ÔÚWIN32ϾÍÎÞ·¨ÊµÏÖÀàËÆforkµÄ¹¦ÄÜÁË¡£ËùÒÔÏÖÔÚWIN32ϵÄCÓïÑÔ±àÒëÆ÷ËùÌṩµÄ¿âº¯ÊýËäÈ»ÒѾÄܼæÈÝ´ó¶àÊýLinux/UNIXµÄ¿âº¯Êý£¬µ«È´ÈÔÎÞ·¨ÊµÏÖfork¡£
¶ÔÓÚ¶àÈÎÎñϵͳ£¬¹²ÏíÊý¾ÝÇøÊDZØÒªµÄ£¬µ«Ò²ÊÇÒ»¸öÈÝÒ×ÒýÆð»ìÂÒµÄÎÊÌ⣬ÔÚWIN32Ï£¬Ò»¸ö³ÌÐòÔ±ºÜÈÝÒ×Íü¼ÇÏß³ÌÖ®¼äµÄÊý¾ÝÊǹ²ÏíµÄÕâÒ»Çé¿ö£¬Ò»¸öÏß³ÌÐ޸ĹýÒ»¸ö±äÁ¿ºó£¬ÁíÒ»¸öÏß³ÌÈ´ÓÖÐÞ¸ÄÁËËü£¬½á¹ûÒýÆð³ÌÐò³öÎÊÌâ¡£µ«ÔÚLinuxÏ£¬ÓÉÓÚ±äÁ¿±¾À´²¢²»¹²Ïí£¬¶øÓɳÌÐòÔ±À´ÏÔʽµØÖ¸¶¨Òª¹²ÏíµÄÊý¾Ý£¬Ê¹³ÌÐò±äµÃ¸üÇåÎúÓ밲ȫ¡£
ÖÁÓÚWIN32µÄ"½ø³Ì"¸ÅÄÆ京ÒåÔòÊÇ"Ó¦ÓóÌÐò"£¬Ò²¾ÍÊÇÏ൱ÓÚUNIXϵÄexecÁË¡£
Ïà¹ØÎĵµ£º
ÕâÁ½Ìì´î½¨ÁËÒ»×éApache·þÎñÆ÷£¬Ã¿Ì¨·þÎñÆ÷4GÄڴ棬²ÉÓõÄÊÇpreforkģʽ£¬Ò»¿ªÊ¼ÉèÖõÄÁ¬½ÓÊýÌ«ÉÙÁË£¬ÐèÒª½Ï³¤µÄʱ¼äÈ¥ÏìÓ¦Óû§µÄÇëÇ󣬺óÀ´ÐÞ¸ÄÁËÒ»ÏÂApache 2.0.59µÄÅäÖÃÎļþhttpd.conf£º
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes ......
´¦ÀíÆ÷µÄ·ÖÀ࣬ÈçÏÂͼËùʾ£º
´æ´¢Æ÷¿É·ÖΪֻ¶Á´æ´¢Æ÷£¨ROM£©¡¢ÉÁ´æ£¨Flash£©¡¢Ëæ»ú´æÈ¡´æ´¢Æ÷£¨RAM£©¡¢¹â½éÖÊ´æ´¢Æ÷ºÍ´Å½éÖÊ´æ´¢Æ÷
Nor FlashºÍcpuµÄ½Ó¿ÚÊôÓÚµäÐ͵ÄÀàSRAM½Ó¿Ú£¬²»ÐèÒªÔö¼Ó¶îÍâµÄ¿ØÖƵç·¡£Nor FlashµÄÌصãÊÇ¿ÉоƬÄÚÖ´ÐУ¬³ÌÐò¿ÉÒÔÖ±½ÓÔÚNorÄÚÔËÐС£¶øNand FashºÍcpuµÄ½Ó¿Ú±ØÐëÓÉÏàÓ¦µÄ¿ØÖƵç·½øÐÐת»»£ ......
1.´´½¨Ä¿Â¼
mkdir [-p][--help][--version][-m <Ŀ¼ÊôÐÔ>][Ŀ¼Ãû³Æ]
-m¿ÉÒÔ¶ÔĿ¼ÉèÖôæȡȨÏÞ,Ò²¿ÉÒÔÓÃchmodeÃüÁîÉèÖÃ,
-p ¿ÉÒÔÊÇÒ»¸ö·¾¶Ãû³Æ,Èç¹û·¾¶ÖÐÓÐЩĿ¼²»´æÔÚ,ÄÇô»á×Ô¶¯´´½¨
2.ɾ³ý¿ÕĿ¼
Óï¡¡¡¡·¨£ºrmdir [-p][--hel ......
Ê×ÏÈ£¬´Óhttp://java.sun.comÖÐÏÂÔØjdk,Îҵİ汾ÊÇjdk1.6.0_20
È»ºó£¬ÖÕ¶ËÊäÈë
´úÂë:
sudo chmod u+x /£¨Â·¾¶Ãû³Æ£©/jdk1.6.0_12.bin
ÐÞ¸ÄbinÎļþȨÏÞ£¬Ê¹Æä¿ÉÖ´ÐÐ
È»ºó£¬Ö´ÐÐ
´úÂë:
sudo £¨Â·¾¶Ãû³Æ£©/jdk1.6.0_20.bin
½«»á³öÏÖ×ÖÄ»£¬³ÖÐø°´»Ø³µ¼ü£¬Ö±ÖÁÆÁÄ»ÏÔʾҪÇóÊäÈë yes/no£¬´ËʱÊäÈëy»Ø³µ£¬½«»á°Ñjdk½âѹµ½Î ......
½ñÌ죬°ÑwindowsÏµĹ¤³Ìµ¼Èëµ½ÁËLinuxÏÂeclipseÖУ¬ÓÉÓÚÒÔÇ°µÄ¹¤³Ì´úÂ룬¶¼ÊÇGBK±àÂëµÄ£¬¶øUbuntuĬÈÏÊDz»Ö§³ÖGBK±àÂëµÄ¡£ËùÒÔ£¬Ê×ÏÈÎÒÃÇÒªÏÈÈÃUbuntuÖ§³ÖGBK£¬·½·¨ÈçÏ£º
1.
ÐÞ¸Ä/var/lib/locales /supported.d/localÎļþ,ÔÚÎļþÖÐÌí¼Ó
z ......