随笔分类 -  操作系统

摘要:第三部分,fork创建第二个进程 [引用github这个博主 多多支持][ https://github.com/sunym1993/flash-linux0.11-talk ] 先看看init中的这段代码 if(!(pid=fork())) { close(0); if (open("/etc/r 阅读全文
posted @ 2022-08-23 10:39 水三丫 阅读(194) 评论(0) 推荐(0) 编辑
摘要:第二部分,(void) open("/dev/tty0",O_RDWR,0); 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] 它会触发一个int 0x80中断,会找的sys_open的函数执行 看看这 阅读全文
posted @ 2022-08-17 09:50 水三丫 阅读(171) 评论(0) 推荐(0) 编辑
摘要:进程的初始化函数,init() 先看看这个函吧: void init(void) { int pid,i; setup((void *) &drive_info); (void) open("/dev/tty0",O_RDWR,0); (void) dup(0); (void) dup(0); pr 阅读全文
posted @ 2022-08-17 09:47 水三丫 阅读(276) 评论(0) 推荐(0) 编辑
摘要:12、从内核态到用户态,move_to_user_mode() 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] 从函数的名称就可以看出来,切换到用户模式 那么怎么才能表示是内核态和用户态,就要用到之前的 阅读全文
posted @ 2022-08-12 13:04 水三丫 阅读(150) 评论(0) 推荐(0) 编辑
摘要:9、第九个初始化函数,hd_init() 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] 先看看这个初始化函数hd_init(): kernel文件 -> blk_drv文件 -> hd.c #defi 阅读全文
posted @ 2022-08-12 13:01 水三丫 阅读(147) 评论(0) 推荐(0) 编辑
摘要:8、第八个初始化函数,buffer_init(buffer_memory_end) 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] 这个函数buffer_init可以看出携带了一个参数buffer_me 阅读全文
posted @ 2022-08-11 12:11 水三丫 阅读(266) 评论(0) 推荐(0) 编辑
摘要:文件系统 [参考gitHub博主][https://mp.weixin.qq.com/s?__biz=Mzk0MjE3NDE0Ng==&mid=2247494176&idx=1&sn=b4680b50090bb3c7b9c49379241c536c&chksm=c2c5908df5b2199b361 阅读全文
posted @ 2022-08-10 12:59 水三丫 阅读(210) 评论(0) 推荐(0) 编辑
摘要:6、第六个初始化函数, time_in() 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] 先来看看这个函数吧 init文件 -> mian.c static void time_init(void) 阅读全文
posted @ 2022-08-09 12:53 水三丫 阅读(215) 评论(0) 推荐(0) 编辑
摘要:5、第五个初始化函数,tty_init() 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] 先看看这个tty_init()的这段代码: kernel文件 -> chr_drv文件 ->tty_io.c 阅读全文
posted @ 2022-08-08 13:45 水三丫 阅读(204) 评论(0) 推荐(0) 编辑
摘要:3、第三个初始化函数,blk_dev_init() 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] kernel文件 -> blk_drv文件 -> l_rw_blk.c void blk_dev_in 阅读全文
posted @ 2022-08-08 13:43 水三丫 阅读(132) 评论(0) 推荐(0) 编辑
摘要:2、第二个初始化函数,trap_init() 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] kernel文件夹 -> traps.c void trap_init(void) { int i; set 阅读全文
posted @ 2022-08-06 10:35 水三丫 阅读(290) 评论(0) 推荐(0) 编辑
摘要:init文件夹 mian.c 参考 [github这个博主的 厉害][ https://github.com/sunym1993/flash-linux0.11-talk ] 首先先看看这个mian.c中的主要几行代码吧 void main(void) { ROOT_DEV = ORIG_ROOT_ 阅读全文
posted @ 2022-08-04 20:44 水三丫 阅读(256) 评论(0) 推荐(0) 编辑
摘要:head.s 参考 [github这个博主的][ https://github.com/sunym1993/flash-linux0.11-talk ] 改变栈顶位置 _pg_dir: startup_32: movl $0x10,%eax mov %ax,%ds mov %ax,%es mov % 阅读全文
posted @ 2022-08-01 21:20 水三丫 阅读(318) 评论(0) 推荐(0) 编辑
摘要:boot文件 setup.s 第二篇随笔 参考 [github这个博主的][ https://github.com/sunym1993/flash-linux0.11-talk ] 中断获取光标的位置,和从磁盘读取一些东西 entry start start: ; ok, the read went 阅读全文
posted @ 2022-07-28 21:17 水三丫 阅读(228) 评论(0) 推荐(0) 编辑
摘要:boot文件 bootsect.s 第一篇随笔 参考 [github这个博主的][ https://github.com/sunym1993/flash-linux0.11-talk ] bootsect.s 开机后会主动把由硬件设置好的主动把第一磁盘扇区212字节的内容读取到内存中 1、boot文 阅读全文
posted @ 2022-07-26 22:21 水三丫 阅读(193) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示