Ecos里面的DSR是什么?

类似于需要排队的中断,仅次于ISR
 eCos uses a split interrupt handling scheme where the interrupt processing is divided into two parts. The first part is the ISR, and the second part is the Deferred Service Routine (DSR). This scheme allows for the minimal amount of interrupt latency in the system by reducing the amount of time spent inside interrupt service routines. The idea is to keep the processing done in the ISR to a bare minimum. In this scheme, the DSR is executed with interrupts enabled, allowing other higher priority interrupts to occur and be processed in the midst of servicing a lower priority interrupt.

In some cases, where very little interrupt processing needs to be done, the interrupt can be handled in the ISR completely. If more complex servicing is required, a DSR should be used. The DSR is executed at a later time when thread scheduling is allowed. Executing the DSR at a later time allows the DSR to use kernel synchronization mechanisms; for example, to signal a thread, via a semaphore, that an interrupt has occurred. However, there are periods where thread scheduling is disabled by the kernel, although these periods are kept as small as possible. User threads can suspend scheduling as well. This prevents the DSR from executing. Preventing the DSR from executing in a timely manner can lead to system failures from an interrupt source overrunning. These issues should be kept in mind when designing the interrupt structure and how it interacts with the threads in the system.

In most cases, the DSR is executed immediately after the ISR completes. However, if a thread has locked the scheduler, the DSR is delayed until the thread unlocks it. The priority scheme is that ISRs have absolute priority over DSRs, and DSRs have absolute priority over threads.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值