ºìÁªLinuxÃÅ»§
Linux°ïÖú

LinuxÄÚºËѧϰ

·¢²¼Ê±¼ä:2007-09-05 00:23:36À´Ô´:ºìÁª×÷Õß:Desktop
linuxÌåϵ½á¹¹
Ò»¸öÍêÕûµÄ²Ù×÷ϵͳ°üÀ¨4²¿·Ö£ºÓ²¼þ£¬²Ù×÷ϵͳÄںˣ¬²Ù×÷ϵͳ·þÎñ£¬ºÍÓû§Ó¦ÓóÌÐò¡£Äں˷Ö2ÖÖģʽ£ºµ¥Äںˣ¬Î¢Äںˡ£µ¥Äںˣ¬½á¹¹½ô´Õ£¬Ëٶȿ죬µ«²ã´ÎÐÔ²»Ç¿¡£linux0.11Êǵ¥Äںˡ£

Óû§Ì¬-ºËÐÄ̬
ÔÚÄÚºË̬ÏÂÔËÐеĽø³Ì²»Äܱ»ÆäËü½ø³ÌÇÀÕ¼£¬¶øÇÒÒ»¸ö½ø³Ì²»ÄܸıäÁíÒ»¸ö½ø³ÌµÄ״̬¡£ÎªÁ˱ÜÃâ½ø³ÌÇл»Ê±Ôì³ÉÄÚºËÊý¾Ý´íÎó£¬ÔÚÖ´ÐÐÁÙ½çÇø´úÂëʱ£¬½ûÖ¹Öжϡ£Ö»Óе±½ø³Ì´Ó¡° ÄÚºËÔËÐÐ̬¡± תÒƵ½¡° ˯Ãß״̬¡±Ê±£¬Äں˲Żá½øÐнø³ÌÇл»²Ù×÷¡£

linuxÄں˰üÀ¨5¸öÄ£¿é£º½ø³Ìµ÷¶È£¬ÄÚ´æ¹ÜÀí£¬Îļþϵͳ£¬½ø³Ì¼äͨÐÅ£¬ÍøÂç½Ó¿Ú½ø³Ìµ÷¶ÈÊǶÔcpu×ÊÔ´µÄ¿ØÖÆÄÚ´æ¹ÜÀíÊǶԴ洢×ÊÔ´µÄ¿ØÖÆËùÓеÄÄ£¿é¶¼ÒÀÀµÓÚ½ø³Ìµ÷¶È¡£

ΪÁËÓÐЧʹÓÃϵͳÄڴ棬ÄÚ´æ·Ö³É²»Í¬µÄ¹¦ÄÜÇøÓò¡£Äں˳ÌÐòÕ¼¾ÝÎïÀíÄڴ濪ʼ²¿·Ö¡£

linuxÄÚºËÔ´´úÂëµÄĿ¼½á¹¹
boot->ϵͳÒýµ¼
fs-¡µÎļþϵͳ
include
init
kenerl/blk_drv,chr_drv£¬sys
lib
mm

linux²ÉÓÃintel cpuµÄÄÚ´æ·ÖÒ³¹ÜÀí»úÖÆ£¨1Ò³4kÎïÀíÄڴ棩£¬Ê¹ÓÃÐéÄâÏßÐεØÖ·ºÍʵ¼ÊÎïÀíµØÖ·Ó³ÉäµÄ·½·¨ÈÃͬʱִÐеijÌÐò¹²Í¬Ê¹ÓÃÓÐÏÞµÄÄڴ档ʹÓÃÕâÖÖ·½·¨£¬Ã¿¸öÖ´ÐÐÖеijÌÐò¿ÉÒÔʹÓñÈʵ¼ÊÄÚ´æ´óµÃ¶àµÄµØÖ·¿Õ¼ä¡£

linux0.11ÐéÄâµØÖ·¿Õ¼äÊÇ4G=64M*64, ÿ¸öÈÎÎñ(½ø³Ì)ÓÐ64MÐéÄâµØÖ·¿Õ¼ä,×î¶à64¸öÈÎÎñ.
ÿ¸öÐéÄâµØÖ·¿Õ¼ä,Í·²¿ÊÇ´úÂëÇø,½ô½Ó×ÅÊý¾ÝÇø,β²¿ÊǶÑÕ»Çø.

bootĿ¼ÏÂÓÐ3¸ö»ã±àÎļþ£¬ÊÇÄÚºËÔ´ÎļþÖÐ×îÏȱ»±àÒëµÄ³ÌÐò¡£
Ö÷Òª¹¦ÄÜÊǼÆËã»úÉϵçʱÒõµÀÄÚºËÆô¶¯£¬½«Äں˴úÂë¼ÓÔص½ÄÚ´æÖУ¬²¢×÷½øÈë32λ±£»¤Ä£Ê½Ç°µÄϵͳ³õʼ»¯¹¤×÷¡£
bootsect.s,setup.s ÐèÒªas86À´±àÒ룬ʹÓõÄÊÇas86»ã±àÓïÑÔ¸ñʽ£¬head.sÐèÒªas±àÒ룬ʹÓõÄÊÇAT&T¸ñʽµÄ»ã±à¡£
bootsect.s ´ÅÅÌÒýµ¼¿é³ÌÐò£¬±àÒëºóפÁôÔÚ´ÅÅ̵ÚÒ»¸öÉÈÇøMBR¡£pcÉϵçbios×Ô¼ìºó£¬±»bios¼ÓÔص½µØÖ·0x7c00´¦Ö´ÐС£
setup.s ¶ÁÈ¡»úÆ÷µÄÓ²¼þÅäÖòÎÊý£¬²¢°ÑÄÚºËÄ£¿ésystemÒƵ½ºÏÊʵÄÄÚ´æµØÖ·¡£
head.s ±»±àÒëÁ¬½ÓÔÚsystemÄ£¿éµÄ×îÇ°²¿·Ö£¬×öÓ²¼þ̽²â¹¤×÷£¬ºÍÄÚ´æ¹ÜÀíµÄ³õʼÅäÖù¤×÷¡£

fsÎļþϵͳĿ¼
°üº¬ÁË17¸öÎļþ£¬ÖîÈç
buffer.c ¶ÔÄÚ´æ¸ßËÙ»º³åÇøµÄ´¦Àí
file_table.c ¶¨ÒåÁËÎļþ¾ä±ú
ioctrl.c ¶¨ÒåÁËio¿ØÖƹ¦ÄÜ
exec.c execº¯Êý´Ø
fcntl.c Îļþi/o¿ØÖÆ
open.c ÐÞ¸Ä,´´½¨Îļþ
char_dev.c ¶¨ÒåÁË×Ö·ûÉ豸¶Áдº¯Êý
pipe.c ¶¨ÒåÁ˹ܵÀ¶ÁÈ¡
file_dev.c Îļþ¶Áдº¯Êý
block_dev.c ¿é¶Áд
truncate.c ɾ³ýÎļþʱÊÍ·ÅÎļþÕ¼ÓõÄÉ豸¿Õ¼ä
inode.c i½Úµã²Ù×÷
bitmap.c i½ÚµãºÍÂß¼­Êý¾Ý¿é
super.c ³¬¼¶¿é

Îļþϵͳ³ÌÐò±¾Éí²¢²»Ö±½Ó¸ú¿éÉ豸µÄÇý¶¯´ò½»µÀ£¬¶øÊÇͨ¹ý¸ßËÙ»º³åÇø¡£
ËùÓжÔÎļþϵͳÖÐÊý¾ÝµÄ·ÃÎÊ,¶¼ÐèÒªÊ×ÏȶÁÈ¡µ½¸ßËÙ»º³åÇø.

includeÍ·ÎļþÖ÷Ŀ¼
kernelĿ¼ÏÂÓÐ12¸ö´úÂëÎļþ
asm.s ´¦ÀíϵͳӲ¼þÒì³£ÒýÆðµÄÖжÏ,ÔÚÖжϴ¦Àí¹ý³ÌÖÐ,·Ö±ðµ÷ÓÃtraps.cµÄ´¦Àíº¯Êý
exit.c ´¦Àí½ø³ÌÖÕÖ¹µÄµ÷ÓÃ
fork.c ʹÓÃÁË2¸öcº¯Êý:find_empty_process, copy_process
mktime.c ʱ¼äº¯Êýmktime()
panic.c ÏÔʾÄں˳ö´íÐÅÏ¢²¢Í£»ú
printk.c ÄÚºËרÓôòÓ¡º¯Êýprintk
sched.c µ÷¶È
signal.c ÐźŴ¦Àí
sys.c ºÜ¶àϵͳº¯Êý
system_calls.c INT 0x80 µ÷ÓõÄϵͳ´¦Àí
vsprintf.c ×Ö·û´®¸ñʽ»¯º¯Êý
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ