LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1075|回复: 3

大家好,请问内核中semaphore可以用在什么地方?

[复制链接]
发表于 2003-8-26 09:01:34 | 显示全部楼层 |阅读模式
大家好,最近碰到一个疑惑,让我头疼不已,linux在核心态只能有一个进程在运行,而semaphore又是为了进程同步设计而设计的,那么semaphore到底可以用于什么方面那?而说得semaphore在user context中应用很大?我对user context理解的可能不是很透彻,麻烦各位高手帮忙?

感激不尽!!!!
发表于 2003-8-29 10:47:15 | 显示全部楼层
C Y ?

hehe
发表于 2003-9-2 12:59:34 | 显示全部楼层

我的理解:

semaphore是内核对象,它的使用对象是用户态进程,不用于内核态进程,而且内核态不能使用semaphore的操作接口吧,如semget(),semop()等。
发表于 2003-9-8 06:43:51 | 显示全部楼层
there are user space semaphore and kernel space semaphore. which one u are talking about?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表