某储备粮的“学习笔记” - OS161 System Calls Implementation Notes 的评论 http://blog.gregwym.info/os161-system-calls-implementation-notes.html zh-CN 这篇文章的目的是记录CS350 Assignment2中, 我编写各种System Calls时所采用的思路. 实际coding的时候, 同一种System Call的实现方式很可能不止一种, 但殊途... Sat, 31 Mar 2012 09:40:25 +0800 Sat, 31 Mar 2012 09:40:25 +0800 咳嗽di小鱼 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-564 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-564 Sat, 31 Mar 2012 09:40:25 +0800 咳嗽di小鱼 我记得, fork过程中应该是splhigh的吧?

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-564#comments
xiaov http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-563 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-563 Sat, 31 Mar 2012 09:07:59 +0800 xiaov 你好,请问在实现fork的过程中,需要使用同步原语来控制同步吗?

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-563#comments
咳嗽di小鱼 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-558 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-558 Thu, 29 Mar 2012 12:34:32 +0800 咳嗽di小鱼 as_create是创建一个address space, 代表的是process运行时可以使用的内存. 是用户空间. 但as这个strcutre本身是kmalloc出来的, 存在在内核空间里.

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-558#comments
xiaov http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-557 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-557 Thu, 29 Mar 2012 02:20:19 +0800 xiaov 麻烦问一下,做fork拷贝addrspace的时候,会调用到as_copy方法,as_copy之中又会调as_create,问题是如何这个as_create开辟出来的地址空间是属于用户空间,还是内核空间?

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-557#comments
saintnoah http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-556 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-556 Tue, 27 Mar 2012 11:53:53 +0800 saintnoah 嗯 有道理 多谢:)

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-556#comments
咳嗽di小鱼 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-555 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-555 Tue, 27 Mar 2012 11:20:08 +0800 咳嗽di小鱼 使用array.h里的array可以规范数据存储, 访问, 删除的方式, 帮助你管理Array的内存使用, 省时省力省bug. 用[], 必要时size不可变, 还涉及kmalloc的内存管理问题, 平添很多不必要的麻烦.

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-555#comments
saintnoah http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-554 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-554 Tue, 27 Mar 2012 11:14:48 +0800 saintnoah 是的 就想请教这个 为什么需要用array.h里的array而不能用[]?

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-554#comments
咳嗽di小鱼 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-552 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-552 Tue, 27 Mar 2012 10:05:35 +0800 咳嗽di小鱼 我的意思是, 所有我文中提到的"array", 都是"kernel/include/array.h"这个array, 而不是[]这个array.

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-552#comments
saintnoah http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-551 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-551 Tue, 27 Mar 2012 09:55:00 +0800 saintnoah 请问为什么 说“所有array都是struct array, OS161中自带的kernel array lib”?

这里的filetable声明为一个结构体指针数组可以吗?

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-551#comments
Dennis http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-513 http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-513 Sat, 03 Mar 2012 11:51:34 +0800 Dennis 感谢greg

]]>
http://blog.gregwym.info/os161-system-calls-implementation-notes.html#comment-513#comments