ÍøÂç½Ø°üÊÇÒ»ÏîºÜÓÐÒâ˼µÄ¿ÎÌ⣬¿ÉÒÔÓÐÊý¾Ý¹ýÂË£¬·À»ðǽ£¬Á÷Á¿¿ØÖÆ£¬±¨ÎĴ۸ĵÈÖî¶àÓ¦Ó㬰´ÕÕÄں˷ֲã¼Ü¹¹½«Ò»Ð©½Ø°ü·½·¨²»ÍêÈ«ÕûÀíÈçÏ£¬»¶Ó²¹³ä¡£
1¡¢ L1²ãÇý¶¯½Ø°ü·¨
ÔÚÇý¶¯ÖÐÏÂÊÖÓ¦¸Ã¿ÉÒÔ˵ÊÇ×îÌù½üµ×²ãµÄ£¬Íø¿¨Çý¶¯ÖÐ×ÜÓÐrx½ÓÊÕºÍxmit·¢Ëͺ¯Êý£¬²ÎÊý×ÜÊÇsk_buffer£¬ÔÚÕâÀïÐ޸ĺܻƺܱ©Á¦£¬¶øÇÒ¼¸ºõ²»ÐèҪʲôlinuxÄں˵Ä֪ʶ¡£
xmitº¯Êýµ÷ÓÃʱµÄ²ÎÊýsk_bufferÒѾÊÇÒ»¸ö·¢Óý½¡È«µÄ³ÉÊìÌ壬Òò´ËÔÚÕâÀï×ö¹ýÂËÄÇÕæÊǵÃÐÄÓ¦ÊÖÃÀ´ôÁË£¬µ±È»Ð޸ĵÄʱºò»¹ÊÇÒªÏÂÒ»·¬¹¦·ò£¬¶ørxµÄʱºòÔòÏà·´£¬¿ÉÁ¯µÄsk_bufferÔÚÕâʱºòÖ»·¢ÓýÁËÁ´Â·²ã(L2)Í·²¿£¬Ò»µ©Éæ¼°µ½½ÏΪ¸´ÔӵĹýÂË£¬ÔòÐèÒª×öһЩģÄâÐÒéÕ»µÄ·ÖÎö£¬ÈçÐèÒª»ñÈ¡udp¶Ë¿Ú£¬¾ÍÒª´Ósk_bufferÖÐÏÈÈ¡³öL3 IP²ãµÄ³¤¶È£¬¶Ôsk_buffer->data×÷ÏàӦλÒÆ¡£
2¡¢ L2²ãÐéÄâÉ豸½Ø°ü·¨
Óë¾ßÌåÍø¿¨É豸Î޹أ¬Í¨¹ýregister_netdevice×¢²áÒ»¸önet_device½á¹¹£¬ÔÚÇý¶¯²ãÉÏÐéÄâÒ»¸öÉ豸½Úµã(ethx.y)£¬À´ÊµÏֽذü£¬Í¨¹ýÉèÖ÷ÓÉ£¬ÈÃÐèÒªÀ¹½ØµÄ±¨ÎÄͨ¹ý¸ÃÉ豸½Úµã·¢³ö£¬´Ó¶øʵÏÖ¹ýÂË¡£
ÕýÊÇÒòΪÐèÒª½áºÏ·ÓÉÀ´Ê¹Ó㬸÷½·¨ÏÔµÃÌرðÓÅÑÅ£¬¶ÔÄ¿µÄIPµÄ¹ýÂËÉõÖÁÔ ......
Name
times - get process times
Synopsis
#include <sys/times.h>
clock_t times(struct tms *buf);
Description
times() stores the current process times in the
struct tms that buf points to. The struct tms is as defined
in <sys/times.h>
:
struct tms {
clock_t tms_utime; /* user time */
clock_t tms_stime; /* system time */
clock_t tms_cutime; /* user time of children */
clock_t tms_cstime; /* system time of children */
};
The tms_utime field contains the CPU time spent executing
instructions of the calling process. The tms_stime field contains the CPU
time spent in the system while executing tasks on behalf of the calling process.
The tms_cutime field contains the sum of the tms_utime and
tms_cutime values for all waited-for terminated children. The
tms_cstime field contains the sum of the tms_stime and
tms_cstime values for all waited-for terminated children.
Times for terminated children (and their descendants) is added in at the
moment wa ......
1.¼ì²éϵͳÊÇ·ñÓÐopen-jdk
[root@localhost Alex] rpm -qa | grep java
tzdata-java-2010c-1.fc12.noarch
java_cup-0.11a-1.fc12.noarch
java-1.5.0-gcj-1.5.0.0-29.fc12.i686
java-1.6.0-openjdk-1.6.0.0-33.b16.fc12.i686
java-1.6.0-openjdk-plugin-1.6.0.0-33.b16.fc12.i686
2.ɾ³ýopen-jdk
[root@localhost Alex] yum remove java-1.6.0-openjdk
3.Ê×ÏÈÄã±ØÐë°²×° SUN Java ±ØÐèµÄ¿âÎļþ
[root@localhost Alex] yum install compat-libstdc++-33
compat-libstdc++-296
4.ͨ¹ýÃüÁî´´½¨±ØÒªµÄÁ´½Ó
[root@localhost Alex] /sbin/ldconfig
5.ÏÂÔØSun-JDK
ÔÚsun¹Ù·½ÏÂÔØhttp://java.sun.com/javase/downloads/index.jsp
Ä¿Ç°×îаæΪjdk-6u18-linux-i586-rpm.bin
6.½øÈëÏÂÔØĿ¼
[root@localhost Alex]# cd ÏÂÔØ
7.Ö´Ðа²×°
[root@localhost ÏÂÔØ]# sh jdk-6u18-linux-i586-rpm.bin
Ò»Ö±¿Õ¸ñ£¬Ö±µ½ÌáʾÄ㠻شðy
8.ÅäÖÃfireFoxµÄjava ²å¼þ
[root@localhost ÏÂÔØ]# ln -s
/usr/java/default/jre/plugin/i386/ns7/libjavaplugin_oji.so
/usr/lib/mozilla/plugins/
9.ÅäÖÃjdkµÄ»·¾³±äÁ¿
ÎÒ²»ÖªµÀrpm°üÊÇ·ñÉèÖÃÁËjdkµÄ»·¾³±äÁ¿£¬ÎÒÏÖÔÚÖ´ÐÐjava,jav ......
·Ò룺·É¸ç (
http://hi.baidu.com/imlidapeng
)
°æȨËùÓУ¬×ðÖØËûÈËÀͶ¯³É¹û£¬×ªÔØʱÇë×¢Ã÷×÷ÕߺÍÔʼ³ö´¦¼°±¾ÉùÃ÷¡£
ÔÎÄÃû³Æ£º¡¶Linux Performance and Tuning Guidelines¡·
ÔÎĵØÖ·£ºhttp://www.redbooks.ibm.com/abstracts/redp4285.html
-------------------------------------------------------------------------------------------
1.1.1 ½ø³ÌÊÇʲô£¿
1.1.2 ½ø³ÌÉúÃüÖÜÆÚ
1.1.3 Ïß³Ì
1.1.4 ½ø³ÌÓÅÏȼ¶ºÍNiceÖµ
1.1.5 ÉÏÏÂÎĽ»»»
1.1.6 Öжϴ¦Àí
1.1.7 ½ø³Ì״̬
1.1.8 ½ø³ÌÄÚ´æ¶Î
1.1.9 CPUµ÷¶ÈÆ÷
-------------------------------------------------------------------------------------------
½ø³Ì¹ÜÀí¶ÔÓÚÈκÎÒ»¸ö²Ù×÷ϵͳÀ´Ëµ¶¼ÊÇ×îÖØÒªµÄÈÎÎñÖ®Ò»¡£¸ßЧµÄ½ø³Ì¹ÜÀíÄܱ£Ö¤Ó¦ÓÃƽÎÈÓÐЧµÄÔËÐС£LinuxµÄ½ø³Ì¹ÜÀíÓëUNIXÊ®·ÖÏàËÆ¡£Ëü°üÀ¨½ø³Ìµ÷¶È¡¢Öжϴ¦Àí¡¢Ðźŷ¢ËÍ¡¢½ø³ÌÓÅÏȼ¶¡¢½ø³ÌÇл»¡¢½ø³Ì״̬¡¢½ø³ÌÄÚ´æµÈ¡£ÔÚ±¾Õ½ÚÖУ¬ÎÒ½«ÌÖÂÛLinux½ø³Ì¹ÜÀíµÄÔÀí¡£ËüÄÜ°ïÖúÄã¸üºÃµÄÁ˽âLinuxÄÚºËÊÇÔõÑù¹ÜÀí½ø³ÌÀ´Ó°ÏìϵͳÐÔÄܵġ£
1.1.1 ½ø³ÌÊÇʲô£¿
½ø³Ì¾ÍÊÇÖ´ÐгÌÐòÔËÐÐÔÚ´¦ÀíÆ÷ÉϵÄÒ»¸öʵÀý¡£½ø³Ì¿ÉÒÔʹÓÃLinuxÄÚºËËùÄÜ¿ØÖƵÄÈκÎ×ÊÔ´À´Íê³ÉËü ......
·Ò룺·É¸ç (
http://hi.baidu.com/imlidapeng
)
°æȨËùÓУ¬×ðÖØËûÈËÀͶ¯³É¹û£¬×ªÔØʱÇë×¢Ã÷×÷ÕߺÍÔʼ³ö´¦¼°±¾ÉùÃ÷¡£
ÔÎÄÃû³Æ£º¡¶Linux Performance and Tuning Guidelines¡·
ÔÎĵØÖ·£ºhttp://www.redbooks.ibm.com/abstracts/redp4285.html
-------------------------------------------------------------------------------------------
ÔÚÎÒÃÇ¿ªÊ¼Ç°£¬ÏÈÀ´ä¯ÀÀÒ»ÏÂLinxu²Ù×÷ϵͳÊÇÔõÑù¿ØÖÆÈÎÎñÀ´Íê³ÉÓëÓ²¼þ×ÊÔ´½»»¥µÄ¡£ÐÔÄܵ÷ÓÅÊÇÒ»ÏÓÐÌôÕ½ÐԵŤ×÷£¬ËüÐèÒª¶ÔÓ²¼þ¡¢²Ù×÷ϵͳºÍ
Ó¦ÓÃÓзdz£ÉîÈëµÄÁ˽⡣µ«Èç¹ûÐÔÄܵ÷Óźܼòµ¥£¬ÄÇôÎÒÃÇËùҪ̽¾¿µÄÅäÖòÎÊý¾Í¿ÉÒÔÖ±½ÓÓ²±àÂëµ½ÈÍÌå»ò²Ù×÷ϵͳÖÐÁË£¬Äã½ñÌì¾Í²»»á¿´µ½±¾ÎÄÁË¡£È»¶øÕýÈçͼ
1-1Ëùʾ£¬·þÎñÆ÷ÐÔÄÜ»áÊܵ½¶àÖÖÒòËصÄÓ°Ïì¡£
ͼ1-1£º²»Í¬Ôª¼þ½»»¥Ê¾Òâͼ
Èç¹ûÒ»¸öÓÐ20000ÃûÓû§µÄÊý¾Ý¿â·þÎñÆ÷£¬È´Ö»ÓµÓÐÒ»¸öµ¥IDEÇý¶¯Æ÷£¬ÕâÑùµÄI/O×ÓϵͳÄã¿ÉÄÜ»¨¼¸¸öÐÇÆÚµÄʱ¼ä¶¼ÎÞ·¨ÓÐЧµÄµ÷ÓÅ¡£ÎªÁËÄÜ´øÀ´
¸üºÃµÄÐÔÄÜ£¬Í¨³£×÷·¨ÊǸü»»Ò»¸öеÄÇý¶¯Æ÷»òÕß½«ÄãµÄÓ¦ÓÃÉý¼¶¡£ÕýÈçÎÒÃÇ֮ǰËùÌÖÂ۵ģ¬ÇëÔÚÍ·ÄÔÖб£³Ö¶ÔϵͳÐÔÄܵÄÕûÌåÓ¡Ïó¡£Á˽â²Ù×÷ϵͳ¹ÜÀí×ÊÔ´µÄ·½
·¨£¬¿ÉÒÔ°ïÖúÎÒÃÇÔÚ¸÷ÖÖ¸÷ÑùµÄÓ¦ÓÃÇé¾³ÖÐÕÒ³öÄĸö×Óϵ ......
Linux ÄÚºËÆô¶¯·ÖÎö
1. ÄÚºËÆô¶¯µØÖ·
1.1. Ãû´Ê½âÊÍ
ZTEXTADDR
½âѹ´úÂëÔËÐеĿªÊ¼µØÖ·¡£Ã»ÓÐÎïÀíµØÖ·ºÍÐéÄâµØÖ·Ö®·Ö£¬ÒòΪ´ËʱMMU´¦ÓڹرÕ״̬¡£Õâ¸öµØÖ·²»Ò»¶¨Ê±RAMµÄµØÖ·£¬¿ÉÒÔÊÇÖ§³Ö¶ÁдѰַµÄflashµÈ´æ´¢Öн顣
Start address of decompressor. here's no point in talking about virtual or physical addresses here, since the MMU will be off at the time when you call the decompressor code. You normally call the kernel at this address to start it booting. This doesn't have to be located in RAM, it can be in flash or other read-only or read-write addressable medium.
ZRELADDR
ÄÚºËÆô¶¯ÔÚRAMÖеĵØÖ·¡£Ñ¹ËõµÄÄÚºËÓ³Ïñ±»½âѹµ½Õâ¸öµØÖ·£¬È»ºóÖ´ÐС£
This is the address where the decompressed kernel will be written, and eventually executed. The following constraint must be valid:
&nbs ......