当前位置: 技术问答>linux和unix
休眠为什么要用等待队列?
来源: 互联网 发布时间:2017-04-22
本文导语: 休眠为什么要用等待队列?不用等待队列不是一样可以休眠么?? | 参考深入理解linux内核 Wait queues have several uses in the kernel, particularly for interrupt handling, process synchronization, and timing...
休眠为什么要用等待队列?不用等待队列不是一样可以休眠么??
|
参考深入理解linux内核
Wait queues have several uses in the kernel, particularly for interrupt handling, process synchronization, and timing. We'll just say here that a process must often wait for some event to occur, such as for a disk operation to terminate, a system resource to be released, or a fixed interval of time to elapse.Wait queues implement conditional waits on events: a process wishing to wait for a specific event places itself in the proper wait queue and relinquishes control. Therefore, a wait queue represents a set of sleeping processes, which are woken up by the kernel when some condition becomes true.
等待队列除了让进程休眠之外,实现了事件上的条件等待: 希望等待特定事件的进程把自己放进合适的等待队列
Wait queues have several uses in the kernel, particularly for interrupt handling, process synchronization, and timing. We'll just say here that a process must often wait for some event to occur, such as for a disk operation to terminate, a system resource to be released, or a fixed interval of time to elapse.Wait queues implement conditional waits on events: a process wishing to wait for a specific event places itself in the proper wait queue and relinquishes control. Therefore, a wait queue represents a set of sleeping processes, which are woken up by the kernel when some condition becomes true.
等待队列除了让进程休眠之外,实现了事件上的条件等待: 希望等待特定事件的进程把自己放进合适的等待队列
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。