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

linux kernel: HZ, tick and jiffies

http://linux.chinaunix.net/bbs/archiver/tid-985372.html
Linux Kernel: ¼ò½éHZ, tick and jiffie
               
Linux[/b]ºËÐÄ幾個ÖØÒª¸ú時間ÓÐ關µÄÃû詞»ò變數£¬µ×ÏÂ將½é紹HZ[/b]¡¢tick與jiffies¡£
HZ[/b]
Linux[/b]ºËÐÄÿ¸ô¹Ì¶¨週ÆÚ會發³ötimer interrupt (IRQ 0)£¬HZ[/b]ÊÇÓÃ來¶¨義ÿһÃëÓÐ幾´Îtimer
interrupts¡£舉Àý來說£¬HZ[/b]為1000£¬´ú±íÿÃëÓÐ1000´Îtimer
interrupts¡£HZ[/b]¿ÉÔÚ編譯ºËÐÄ時設¶¨£¬ÈçÏÂËùʾ (ÒÔºËÐÄ°æ±¾2.6.20-15為Àý)£º
adrian@adrian-desktop:~$ cd /usr/src/linux[/b]
adrian@adrian-desktop:/usr/src/linux[/b]$ make menuconfig
Processor type and features  ---> Timer frequency (250 HZ[/b])  --->
ÆäÖÐHZ[/b]¿É設¶¨100¡¢250¡¢300»ò1000¡£ÒÔСµÜµÄºËÐÄ°æ±¾預設Öµ為250¡£
С實驗
觀²ì/proc/interruptµÄtimerÖÐ斷´Î數£¬並ì¶Ò»ÃëááÔÙ´Î觀²ìÆäÖµ¡£Àí論ÉÏ£¬兩Õß應該Ïà²î250×óÓÒ¡£
adrian@adrian-desktop:~$ cat /proc/interrupts | grep timer && sleep 1 && cat /proc/interrupts | grep timer
0:             9309306               IO-APIC-edge          timer
0:                    9309562               IO-APIC-edge         timer
ÉÏÃæËÄ個欄λ·Ö別為ÖÐ斷號碼¡¢CPUÖÐ斷´Î數¡¢PIC與裝ÖÃÃû稱¡£
問題來ÁË£¬timer interrupt會×öÄÄЩÊÂÇé? ´ð°¸ÈçÏÂËùÁУº
[list][*]¸üÐÂ時間¡¢ÈÕÆÚ與ϵ統從開機ÖÁÄ¿Ç°經過¶àÉÙ時間
¡£[*]¸üÐÂϵ統資ԴʹÓÃÂÊ統計[*]


Ïà¹ØÎĵµ£º

Linux ºÍ ¶àÏß³Ì

ÿ´Î¶¼ÊÇÓõ½£¬²éһϣ¬Ð´Ï£¬Õâ´ÎÉÔ΢¼Ç¼Ï±ʼǡ£
ºÍThreadÏà¹Ø£¬»ù±¾µÄÓÐ3¸ö¸ÅÄÏ̵߳Ľ¨Á¢ºÍÏú»Ù£»Ïß³ÌËø£»Ïß³ÌÌõ¼þ
¹ØÓÚ½¨Á¢Ị̈߳º
ret = pthread_create(&thread_id, NULL, Do_Thread, &Do_Thread_Para);
// µÚ2²ÎÊýÊÇthread ÊôÐÔ£¬Ò»°ãÎÒ²»ÓÃÉèÖÃ
// µÚ4¸ö²ÎÊýÊÇDo_ThreadµÄÈë¿Ú²ÎÊý£¬Ò»°ãÎÒ´«Ò»¸ö½á ......

Linux ¸÷Ä£¿é¼Ü¹¹Í¼


 
  Resources on the site
• Interactive map of GNU/Linux OS and FOSS
• "GNU/Linux is my home" - map of GNU/Linux system
• Interactive map of Linux kernel
• Linux inside
• Linux Technology Reference (single page view)
• Linux kernel diagram
• Li ......

LinuxÖ®Ïß³Ìͬ²½Æª

½øÐжàÏ̱߳à³Ì£¬×îÍ·Ì۵ľÍÊÇÄÇЩ¹²ÏíµÄÊý¾Ý¡£ÒòΪÄãÎÞ·¨ÖªµÀÄĸöÏ̻߳áÔÚÄĸöʱºò¶ÔËü½øÐвÙ×÷£¬ÄãÒ²ÎÞ·¨µÃÖªÄǸöÏ̻߳áÏÈÔËÐУ¬ÄĸöÏ̻߳áºóÔËÐС£ÏÂÃæ½éÉÜһЩ¼¼Êõ£¬Í¨¹ýËûÃÇ£¬Äã»áºÏÀí°²ÅÅÄãµÄÏß³ÌÖ®¼ä¶Ô×ÊÔ´µÄ¾ºÕù¡£
l         »¥³âÌåMutex
l    &nbs ......

linuxÓû§¹ÜÀí

Ŀ¼Ë÷Òý
Ò»¡¢ÓëÓû§¹ÜÀíÏà¹ØµÄ
ÅäÖÃÎļþ£»
1¡¢/etc
/passwd ºÍ/etc/groups
2¡¢³¬¼¶È¨
ÏÞ¿ØÖÆ sudo µÄÅäÖÃÎļþ/etc/sudoers £»
3¡¢Ìí¼ÓÓÃ
»§¹æÔòÎļþ /etc/login.defs ºÍ /etc/default/useradd
¶þ¡¢Ìí¼ÓÓû§¹¤¾ßºÍ·½
·¨£»
1¡¢useradd
¹¤¾ß£»
1.1¡¢
useraadd ÃüÁîÖÐµÄ -DÔËÓÃ
1.2¡¢
useradd Ìí¼ÓÓû§£» ......

ÓÃVNCʵÏÖÔ¶³Ì×ÀÃæ¹²Ïí(Ö§³ÖWindows, Linux, ¡­)

VNC£¬È«³ÆΪVirtual Network Computing£¬ËüÊÇÒ»¸ö×ÀÃæ¹²Ïíϵͳ¡£ËüµÄ¹¦ÄÜ£¬ÀàËÆÓÚwindowsÖеÄÔ¶³Ì×ÀÃ湦ÄÜ¡£VNCʹÓÃÁËRFB(Remote FrameBuffer£¬Ô¶³ÌÖ¡»º³å£©Ð­ÒéÀ´ÊµÏÖÔ¶³Ì¿ØÖÆÁíÍâһ̨¼ÆËã»ú¡£Ëü°Ñ¼üÅÌ¡¢Êó±ê¶¯×÷·¢Ë͵½Ô¶³Ì¼ÆËã»ú£¬²¢°ÑÔ¶³Ì¼ÆËã»úµÄÆÁÄ»·¢»Øµ½±¾µØ¡£
VNC¼¼ÊõÓëƽ̨Î޹أ¬VNC Viewer¿ÉÒÔºÍVNC ServerÔÚ²»Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ