linux½ø³Ìµ÷¶È·½·¨SCHED_OTHER,SCHED_FIFO,SCHED_RR
linux½ø³Ìµ÷¶È·½·¨(SCHED_OTHER,SCHED_FIFO,SCHED_RR)
linuxÄں˵ÄÈýÖÖµ÷¶È·½·¨£º
1£¬SCHED_OTHER ·Öʱµ÷¶È²ßÂÔ£¬
2£¬SCHED_FIFOʵʱµ÷¶È²ßÂÔ£¬Ïȵ½ÏÈ·þÎñ
3£¬SCHED_RRʵʱµ÷¶È²ßÂÔ£¬Ê±¼äƬÂÖת
linuxÄں˵ÄÈýÖÖµ÷¶È·½·¨£º
1£¬SCHED_OTHER ·Öʱµ÷¶È²ßÂÔ£¬
2£¬SCHED_FIFOʵʱµ÷¶È²ßÂÔ£¬Ïȵ½ÏÈ·þÎñ
3£¬SCHED_RRʵʱµ÷¶È²ßÂÔ£¬Ê±¼äƬÂÖת
ʵʱ½ø³Ì½«µÃµ½ÓÅÏȵ÷Óã¬ÊµÊ±½ø³Ì¸ù¾ÝʵʱÓÅÏȼ¶¾ö¶¨µ÷¶ÈȨֵ£¬·Öʱ½ø³ÌÔòͨ¹ýniceºÍcounterÖµ¾ö¶¨È¨Öµ£¬niceԽС£¬counterÔ½´ó£¬±»µ÷¶ÈµÄ¸ÅÂÊÔ½´ó£¬Ò²¾ÍÊÇÔø¾Ê¹ÓÃÁËcpu×îÉٵĽø³Ì½«»áµÃµ½ÓÅÏȵ÷¶È¡£
SHCED_RRºÍSCHED_FIFOµÄ²»Í¬£º
µ±²ÉÓÃSHCED_RR²ßÂԵĽø³ÌµÄʱ¼äƬÓÃÍ꣬ϵͳ½«ÖØзÖÅäʱ¼äƬ£¬²¢ÖÃÓÚ¾ÍÐ÷¶ÓÁÐβ¡£·ÅÔÚ¶ÓÁÐβ±£Ö¤ÁËËùÓоßÓÐÏàͬÓÅÏȼ¶µÄRRÈÎÎñµÄµ÷¶È¹«Æ½¡£
SCHED_FIFOÒ»µ©Õ¼ÓÃcpuÔòÒ»Ö±ÔËÐС£Ò»Ö±ÔËÐÐÖ±µ½Óиü¸ßÓÅÏȼ¶ÈÎÎñµ½´ï»ò×Ô¼º·ÅÆú¡£
Èç¹ûÓÐÏàͬÓÅÏȼ¶µÄʵʱ½ø³Ì£¨¸ù¾ÝÓÅÏȼ¶¼ÆËãµÄµ÷¶ÈȨֵÊÇÒ»ÑùµÄ£©ÒѾ׼±¸ºÃ£¬FIFOʱ±ØÐëµÈ´ý¸Ã½ø³ÌÖ÷¶¯·ÅÆúºó²Å¿ÉÒÔÔËÐÐÕâ¸öÓÅÏȼ¶ÏàͬµÄÈÎÎñ¡£¶øRR¿ÉÒÔÈÃÿ¸öÈÎÎñ¶¼Ö´ÐÐÒ»¶Îʱ¼ä¡£
Ïàͬµã£º
RRºÍFIFO¶¼Ö»ÓÃÓÚʵʱÈÎÎñ¡£
´´½¨Ê±ÓÅÏȼ¶´óÓÚ0(1-99)¡£
°´ÕÕ¿ÉÇÀÕ¼ÓÅÏȼ¶µ÷¶ÈËã·¨½øÐС£
¾ÍÐ÷̬µÄʵʱÈÎÎñÁ¢¼´ÇÀÕ¼·ÇʵʱÈÎÎñ¡£
ËùÓÐÈÎÎñ¶¼²ÉÓÃlinux·Öʱµ÷¶È²ßÂÔʱ¡£
1£¬´´½¨ÈÎÎñÖ¸¶¨²ÉÓ÷Öʱµ÷¶È²ßÂÔ£¬²¢Ö¸¶¨ÓÅÏȼ¶niceÖµ(-20~19)¡£
2£¬½«¸ù¾Ýÿ¸öÈÎÎñµÄniceֵȷ¶¨ÔÚcpuÉϵÄÖ´ÐÐʱ¼ä(counter)¡£
3£¬Èç¹ûûÓеȴý×ÊÔ´£¬Ôò½«¸ÃÈÎÎñ¼ÓÈëµ½¾ÍÐ÷¶ÓÁÐÖС£
4£¬µ÷¶È³ÌÐò±éÀú¾ÍÐ÷¶ÓÁÐÖеÄÈÎÎñ£¬Í¨¹ý¶Ôÿ¸öÈÎÎñ¶¯Ì¬ÓÅÏȼ¶µÄ¼ÆËã(counter+20-nice)½á¹û£¬Ñ¡Ôñ¼ÆËã½á¹û×î´óµÄÒ»¸öÈ¥ÔËÐУ¬µ±Õâ¸öʱ¼äƬÓÃÍêºó(counter¼õÖÁ0)»òÕßÖ÷¶¯·ÅÆúcpuʱ£¬¸ÃÈÎÎñ½«±»·ÅÔÚ¾ÍÐ÷¶ÓÁÐĩβ(ʱ¼äƬÓÃÍê)»òµÈ´ý¶ÓÁÐ(ÒòµÈ´ý×ÊÔ´¶ø·ÅÆúcpu)ÖС£
5£¬´Ëʱµ÷¶È³ÌÐòÖظ´ÉÏÃæ¼ÆËã¹ý³Ì£¬×ªµ½µÚ4²½¡£
6£¬µ±µ÷¶È³ÌÐò·¢ÏÖËùÓоÍÐ÷ÈÎÎñ¼ÆËãËùµÃµÄȨֵ¶¼Îª²»´óÓÚ0ʱ£¬Öظ´µÚ2²½¡£
ËùÓÐÈÎÎñ¶¼²ÉÓÃFIFOʱ£¬
1£¬´´½¨½ø³Ìʱָ¶¨²ÉÓÃFIFO£¬²¢ÉèÖÃʵʱÓÅÏȼ¶rt_priority(1-99)¡£
2,Èç¹ûûÓеȴý×ÊÔ´£¬Ôò½«¸ÃÈÎÎñ¼ÓÈëµ½¾ÍÐ÷¶ÓÁÐÖС£
3£¬µ÷¶È³ÌÐò±éÀú¾ÍÐ÷¶ÓÁУ¬¸ù¾ÝʵʱÓÅÏȼ¶¼ÆËãµ÷¶ÈȨֵ(1000+rt_priority),Ñ¡ÔñȨֵ×î¸ßµÄÈÎÎñʹÓÃcpu£¬¸ÃFIFOÈÎÎñ½«Ò»Ö±Õ¼ÓÐcpuÖ±µ½ÓÐÓÅÏȼ¶¸ü¸ßµÄÈÎÎñ¾ÍÐ÷(¼´Ê¹ÓÅÏȼ¶ÏàͬҲ²»ÐÐ)»òÕßÖ÷¶¯·ÅÆú(µÈ´ý×ÊÔ´)¡£
4£¬µ÷¶È³ÌÐò·¢ÏÖÓÐÓÅ
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
¾¹ýǧÐÁÍò¿àµÄÅäÖã¬ÖÕÓÚÔÚubuntuÉϽ«tftp·þÎñÅäÖúã¬ÏÖ½«ÅäÖùý³Ì¼Ç¼ÈçÏÂ:
1 °²×°
#´ó²¿·ÖÍøÉÏ˵Ã÷½«´Ë´¦ÂÔÈ¥
sudo apt-get install tftp tftpd openbsd-inetd
#ÏÈ°²×°ÕâЩ£¬Ã»ÓвâÊÔ²»°²×°µÄºó¹û
#Èç¹û°´ÕÕÏÂÃæµÄ°²×°·½·¨Î´ÄÜʵÏÖtftp·þÎñ£¬ÄÇôÇë°²×°ÏÂÃæµÄÈí¼þ
sudo apt-get install tftpd-hpa tftp-hpa ......
ELFÊÇlinuxÖÐʹÓÃ×î¹ã·ºµÄÒ»ÖÖÓ¦ÓóÌÐò¸ñʽ£¬ÎªÁËŪÇå³þLinuxÄÚºËÊÇÈçºÎ½²ELFÎļþ¾«È·Ó³Éäµ½Ö¸¶¨ÄÚ´æ¿Õ¼ä£¬ÉÏÖÜÄ©°ÑÄÚºËsys_execve²¿·ÖºÃºÃ¿´ÁËÒ»±é£¬Ð¡½áÈçÏ£º
1. ELF¸ñʽ
ELFÖ¸¶¨Á˽ø³ÌÖÐtext¶Î¡¢bss¶Î¡¢data¶ÎµÈÓ¦¸Ã·ÅÖõ½½ø³ÌÐéÄâÄÚ´æ¿Õ¼äµÄʲôλÖã¬ÒÔ¼°¼Ç¼Á˽ø³ÌÐèÒªÓõ½µÄ¸÷ÖÖ¶¯Ì¬Á´½Ó¿âµÄλÖá£
2. sys_exe ......
1¡¢yum install subversion # °²×°svn×é¼þ
°²×°³É¹¦Ö®ºó£¬¿ÉÒÔ¿´µ½ÈçÏÂÏà¹ØµÄÃüÁî±»Éú³É£º
[flykobe@localhost svnclient]$ svn
svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion
2¡¢Éú³Ésvn²Ö¿â
svnadmin create /var/svnrepos
[flykobe@local ......
*ɱËÀ½ø³Ì×ȫµÄ·½·¨Êǵ¥´¿Ê¹ÓÃkillÃüÁ²»¼ÓÐÞÊηû£¬²»´ø±êÖ¾¡£
Ê×ÏÈʹÓÃps -efÃüÁîÈ·¶¨ÒªÉ±ËÀ½ø³ÌµÄPID£¬È»ºóÊäÈëÒÔÏÂÃüÁ
# kill -pid
×¢ÊÍ£º±ê×¼µÄkillÃüÁîͨ³£¶¼ÄܴﵽĿµÄ¡£ÖÕÖ¹ÓÐÎÊÌâµÄ½ø³Ì£¬²¢°Ñ½ø³ÌµÄ×ÊÔ´ÊͷŸøϵͳ¡£È»¶ø£¬Èç¹û½ø³ÌÆô¶¯ÁË×Ó½ø³Ì£¬Ö»É±ËÀ¸¸½ø³Ì£¬×Ó½ø³ÌÈÔÔÚÔËÐУ ......