ʹÓà Linux ϵͳµ÷ÓõÄÄÚºËÃüÁî
2007 Äê 4 ÔÂ 17 ÈÕ
Linux® ϵͳµ÷Óà ——
ÎÒÃÇÿÌ춼ÔÚʹÓÃËüÃÇ¡£²»¹ýÄúÇå³þϵͳµ÷ÓÃÊÇÈçºÎÔÚÓû§¿Õ¼äºÍÄÚºËÖ®¼äÖ´ÐеÄÂ𣿱¾ÎĽ«Ì½¾¿ Linux
ϵͳµ÷Óýӿڣ¨SCI£©£¬Ñ§Ï°ÈçºÎÌí¼ÓеÄϵͳµ÷Óã¨ÒÔ¼°ÊµÏÖÕâÖÖ¹¦ÄܵÄÆäËû·½·¨£©£¬²¢½éÉÜÓë SCI ÓйصÄһЩ¹¤¾ß¡£
ϵͳµ÷ÓÃ
¾ÍÊÇÓû§¿Õ¼äÓ¦ÓóÌÐòºÍÄÚºËÌṩµÄ·þÎñÖ®¼äµÄÒ»¸ö½Ó¿Ú¡£ÓÉÓÚ·þÎñÊÇÔÚÄÚºËÖÐÌṩµÄ£¬Òò´ËÎÞ·¨Ö´ÐÐ
Ö±½Óµ÷Óã»Ïà·´£¬Äú±ØÐëʹÓÃÒ»¸ö½ø³ÌÀ´¿çÔ½Óû§¿Õ¼äÓëÄÚºËÖ®¼äµÄ½çÏÞ¡£ÔÚÌض¨¼Ü¹¹ÖÐʵÏִ˹¦Äܵķ½·¨»áÓÐËù²»Í¬¡£Òò´Ë£¬±¾ÎĽ«×ÅÑÛÓÚ×îͨÓõļܹ¹ ——
i386¡£
ÔÚ±¾ÎÄÖУ¬ÎÒ½«Ì½¾¿ Linux SCI£¬ÑÝʾÈçºÎÏò 2.6.20
ÄÚºËÌí¼ÓÒ»¸öϵͳµ÷Óã¬È»ºó´ÓÓû§¿Õ¼äÀ´Ê¹ÓÃÕâ¸öº¯Êý¡£ÎÒÃÇ»¹½«Ñо¿ÔÚ½øÐÐϵͳµ÷Óÿª·¢Ê±·Ç³£ÓÐÓõÄһЩº¯Êý£¬ÒÔ¼°ÏµÍ³µ÷ÓõÄÆäËûÑ¡Ôñ¡£×îºó£¬ÎÒÃǽ«½éÉÜ
Óëϵͳµ÷ÓÃÓйصÄһЩ¸¨Öú»úÖÆ£¬±ÈÈçÔÚij¸ö½ø³ÌÖиú×Ùϵͳµ÷ÓõÄʹÓÃÇé¿ö¡£
SCI
Linux ÖÐϵͳµ÷ÓõÄʵÏÖ»á¸ù¾Ý²»Í¬µÄ¼Ü¹¹¶øÓÐËù±ä»¯£¬¶øÇÒ¼´Ê¹ÔÚijÖÖ¸ø¶¨µÄÌå¼Ü¹¹ÉÏÒ²»á²»Í¬¡£ÀýÈ磬ÔçÆÚµÄ x86
´¦ÀíÆ÷ʹÓÃÁËÖжϻúÖÆ´ÓÓû§¿Õ¼äǨÒƵ½Äں˿ռäÖУ¬²»¹ýÐ嵀 IA-32 ´¦ÀíÆ÷ÔòÌṩÁËһЩָÁî¶ÔÕâÖÖת»»½øÐÐÓÅ»¯£¨Ê¹Óà sysenter
ºÍ sysexit
Ö¸Á¡£ÓÉÓÚ´æÔÚ´óÁ¿µÄ·½·¨£¬×îÖÕ½á¹ûÒ²·Ç³£¸´ÔÓ£¬Òò´Ë±¾ÎĽ«×ÅÖØÓÚ½Ó¿Úϸ½ÚµÄ±í²ãÌÖÂÛÉÏ¡£¸üÏ꾡µÄÄÚÈÝÇë²Î¿´±¾ÎÄ×îºóµÄ ²Î
¿¼×ÊÁÏ
¡£
Òª¶Ô Linux µÄ SCI ½øÐиĽø£¬Äú²»ÐèÒªÍêÈ«Àí½â SCI
µÄÄÚ²¿ÔÀí£¬Òò´ËÎÒ½«Ê¹ÓÃÒ»¸ö¼òµ¥µÄϵͳµ÷Óýø³Ì£¨Çë²Î¿´Í¼ 1£©¡£Ã¿¸öϵͳµ÷Óö¼ÊÇͨ¹ýÒ»¸öµ¥Ò»µÄÈë¿Úµã¶à·´«ÈëÄںˡ£eax
¼Ä´æÆ÷ÓÃÀ´±êʶӦµ±µ÷ÓõÄij¸öϵͳµ÷Óã¬ÕâÔÚ C
¿âÖÐ×öÁËÖ¸¶¨£¨À´×ÔÓû§¿Õ¼äÓ¦ÓóÌÐòµÄÿ¸öµ÷Óã©¡£µ±¼ÓÔØÁËϵͳµÄ C
¿âµ÷ÓÃË÷ÒýºÍ²ÎÊýʱ£¬¾Í»áµ÷ÓÃÒ»¸öÈí¼þÖжϣ¨0x80 Öжϣ©£¬Ëü½«Ö´ÐÐ system_call
º¯Êý£¨Í¨¹ýÖжϴ¦Àí³ÌÐò£©£¬Õâ¸öº¯Êý»á°´ÕÕ eax ÄÚÈÝÖеıêʶ´¦ÀíËùÓеÄϵͳµ÷Óá£ÔÚ¾¹ý¼¸¸ö¼òµ¥²âÊÔÖ®ºó£¬Ê¹Óà system_call_table
ºÍ eax Öаüº¬µÄË÷ÒýÀ´Ö´ÐÐÕæÕýµÄϵͳµ÷ÓÃÁË¡£´Óϵͳµ÷ÓÃÖзµ»Øºó£¬×îÖÕÖ´ÐÐ syscall_exit
£¬²¢µ÷Óà resume_userspace
·µ»ØÓû§¿Õ¼ä¡£È»ºó¼ÌÐøÔÚ C
¿âÖÐÖ´ÐУ¬Ëü½«·µ»Øµ½Óû§Ó¦ÓóÌÐòÖС£
ͼ 1. ʹÓÃÖжϷ½·¨µÄϵͳµ÷Óõļò»¯Á÷³Ì
SCI µÄºËÐÄÊÇϵͳµ÷Óöà··Ö½â±í¡£Õâ¸ö±íÈçͼ 2 Ëùʾ£¬
Ïà¹ØÎĵµ£º
List_Head
²Ù×÷ϵͳÄں˾³£ÐèҪά»¤Êý¾Ý½á¹¹¡£ÄÚºËÓбê×¼µÄÑ»·Á´±í¡¢Ë«ÏòÁ´±íµÄʵÏÖ¡£ÔÚ<Linux/list.h>ÎļþÖж¨ÒåÁËÒ»¸ölist_headÀàÐͼòµ¥½á¹¹£º
struct list_head {
struct list_head *next, *prev;
};
ͨÓÃÁ´±íµÄ³£ÓÃÓÃ;Êǽ«Ä³Ò»¸öÊý¾Ý½á¹¹±¾Éí´®³ÉÁ´±í£¬»ò½«Ä³Ð©Á´±íÓëÒ»¸öÊý¾Ý½á¹ ......
Ŀ ¼
Çý¶¯
I/O¶Ë¿Ú
from smth
»ù±¾½á¹¹
Çý¶¯³ÌÐò
¾ßÌåʵÏÖ
PCI
loopback
Sis 900
ISA×ÜÏßDMAµÄʵÏÖ
Çý¶¯
Linuxϵͳ֧³ÖÈýÖÖÀàÐ͵ÄÓ²¼þÉ豸£º×Ö·ûÉ豸¡¢¿éÉè
< type="text/javascript">< type="text/jav ......
ÓÉÓÚÕâЩÎļþ²»ÊÇÆÕͨµÄÎļþ£¬ËùÒÔÎÒÃDz»ÄÜÓÃ
ANSI C
£¨±ê×¼
C
£©µÄ
fopen
¡¢
fclose
µÈÀ´²Ù×÷Îļþ£¬¶øÓ¦¸ÃʹÓÃϵͳÎļþ
I/O
´¦Àíº¯Êý£¨
open
¡¢
read
¡¢
write
¡¢
lseek
ºÍ
close
£©À´´¦ÀíÕâЩÉ豸Îļþ¡£
ioctl
£¨£©»òÐíÊÇ
Linux
ÏÂ×îÅÓÔӵĺ¯Êý£¬Ëü¿ÉÒÔ¿ØÖƸ÷ÖÖÎļþµÄÊôÐÔ£¬ÔÚ
Linux
ÉùÒôÉ豸± ......
ÏÂÔØJRE(Java Runtime Environment) ¡£(http://java.sun.com/javase/downloads/index.jsp)
ii. [root@localhost ~]#mkdir /usr/local/java
iii. (½«µµ°¸jre-1_5_0_09-linux-i586-rpm.binÏÂÔص½/usr/local/javaĿ¼ÏÂ)
iv. (³¬¼¶Óû§Ä£Ê½)
[root@localhost ~]#s ......