首页 > WinDriver > WD-(ISR,DPC,APC)中断相关名词解释
2013五月30

WD-(ISR,DPC,APC)中断相关名词解释

[隐藏]

1.ISR

windows内部使用IDT(Interrupt Descriptor Table,中断描述符表),将每个中断或异常与一个处理该中断或异常的服务例程联系起来,因而一旦中断或异常发生,该服务例程即被执行。

Windows 在此硬件机制的基础上,又提供了一种更为灵活的软件机制,允许设备驱动程序为特定的中断向量添加它的中断服务例程(ISR,Interrupt ServiceRoutine)。

一个中断向量允许连接多个中断对象(interrupt object),这里中断对象是一种封装了中断服务例程的内核对象。当中断发生时,这些中断对象中的服务例程都有机会处理该中断。

通过中断对象机制,设备驱动程序可以在不操纵IDT 的情况下加入它们的中断服务例程;另一方面,多个硬件设备也可以共享同样的硬件中断向量。

  

2.IRQL

InterruptRequest Level,Windows有两类中断:硬件中断和软中断

  

2.1.软中断

PASSIVE_LEVEL:RQL=0表示普通线程,称为或被动级别,它的优先级最低,可被任何其他级别的中断打断

APC_LEVEL:RQL=1表示异步过程调用(APC,Asynchronous Procedure Call),它仅仅比PASSIVE_LEVEL 高,因此,在一个线程中插入一个APC 对象可以打断该线程的执行

DISPATCH_LEVEL:RQL=2被称为延迟过程调用(DPC,Deferred Procedure Call)

  

2.2.硬件中断

3~26 是设备IRQL,27~31 是一些特殊的硬件中断,包括时钟中断、电源中断、处理器间中断等,它们都是硬件中断

DPC 是一个重要的概念,它高于PASSIVE_LEVEL和APC_LEVEL,因此它优先于任何一个与线程相关的函数,也屏蔽了线程调度;同时又低于所有的硬件中断,所以它不会屏蔽任何一个硬件中断。之所以称为“延迟的”过程调用,是因为它往往被用来执行一些相对于当前高优先级的任务来说不那么紧急的事情,例如,硬件中断服务例程可以把一些相对不紧急的事情放到一个DPC 对象中处理,从而缩短处理器停留在高IRQL 的时间。在Windows 内核中,DPC 的一个典型用法是定时器(timer)的实现,在时钟中断服务例程中,它负责更新中断时间、系统时间,以及当前线程的时间信息等,并判断系统的定时器数组中是否有定时器到期,若有则发出DISPATCH_LEVEL 的软中断请求。定时器的到期是在DPC 交付(deliver)过程中处理的,定时器被当做一种特殊的DPC对象而交付执行。

文章作者:hgy413
本文地址:https://hgy413.com/93.html
版权所有 © 转载时必须以链接形式注明作者和原始出处!

19 Responses to “WD-(ISR,DPC,APC)中断相关名词解释”

  1. #1 minecraft 回复 | 引用 Post:2018-10-03 20:41

    Hello There. I found your blog the usage of msn. This is a really neatly written article.
    I will make sure to bookmark it and return to read extra of your helpful information. Thank
    you for the post. I’ll definitely return.

  2. #2 minecraft 回复 | 引用 Post:2018-10-04 14:20

    Paragraph writing is also a fun, if you be familiar with
    after that you can write if not it is complicated to write.

  3. #3 minecraft 回复 | 引用 Post:2018-10-07 09:09

    Pretty section of content. I just stumbled upon your web site and in accession capital to assert that I acquire in fact enjoyed
    account your blog posts. Any way I’ll be subscribing to your augment and even I achievement you access consistently
    quickly.

  4. Greetings from Ohio! I’m bored to tears at work so I decided to
    check out your website on my iphone during lunch break. I really like
    the knowledge you provide here and can’t wait
    to take a look when I get home. I’m shocked at how quick your blog loaded on my
    cell phone .. I’m not even using WIFI, just 3G .. Anyhow, wonderful site!

  5. Ahaa, its nice discussion concerning this paragraph at this place at this blog, I have read all that, so at this time me also commenting at this place.

  6. Its like you read my mind! You appear to know so much
    about this, like you wrote the book in it or something.
    I think that you can do with some pics to drive the message home a bit, but instead
    of that, this is magnificent blog. An excellent read.
    I will certainly be back.

  7. Nice post. I learn something totally new and challenging on sites I stumbleupon everyday.

    It will always be useful to read through articles from other writers and practice something from other sites.

  8. This piece of writing is actually a nice one it helps new internet users,
    who are wishing in favor of blogging.

  9. #9 quest bars cheap 回复 | 引用 Post:2018-11-04 03:32

    Hello there! I know this is kinda off topic but I’d figured I’d
    ask. Would you be interested in trading links or maybe guest writing a blog post or
    vice-versa? My blog addresses a lot of the same subjects
    as yours and I feel we could greatly benefit from each other.

    If you might be interested feel free to shoot me an email.
    I look forward to hearing from you! Superb
    blog by the way!

  10. #10 Quest Protein Bars 回复 | 引用 Post:2018-11-06 02:20

    I visit every day a few sites and blogs to read
    articles or reviews, however this webpage gives feature
    based content.

  11. #11 Sling TV 回复 | 引用 Post:2018-11-10 01:14

    Thanks in support of sharing such a good idea, paragraph is good, thats why i have read it completely

  12. Just desire to say your article is as astounding.
    The clearness to your put up is simply spectacular and that i could suppose you are knowledgeable on this
    subject. Fine along with your permission let me to clutch your RSS feed to stay up to date with impending post.
    Thanks 1,000,000 and please carry on the rewarding
    work.

  13. #13 Sling TV 回复 | 引用 Post:2018-11-14 08:05

    Nice blog here! Additionally your website a lot up
    very fast! What web host are you the use of? Can I get your associate hyperlink
    on your host? I desire my site loaded up as fast as yours
    lol

  14. Sling tv coupons and promo codes for november 2018
    Does your site have a contact page? I’m having a tough time locating it but, I’d like to shoot you an email.
    I’ve got some ideas for your blog you might be interested in hearing.
    Either way, great site and I look forward to seeing it develop
    over time. Sling tv coupons and promo codes for november 2018

  15. Way cool! Some very valid points! I appreciate you writing this
    post and the rest of the site is also very good.

  16. I know this if off topic but I’m looking into starting my
    own weblog and was curious what all is required to get setup?
    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very web smart so I’m not 100% positive. Any tips or advice would be greatly appreciated.

    Thanks

  17. Admiring the time and energy you put into your site and
    detailed information you present. It’s great to come across
    a blog every once in a while that isn’t the same unwanted
    rehashed material. Wonderful read! I’ve saved your site and
    I’m including your RSS feeds to my Google account.

  18. #18 g 回复 | 引用 Post:2020-06-15 14:51

    Hello there! Do you know if they make any plugins to
    assist with SEO? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains.
    If you know of any please share. Kudos!

  19. #19 g 回复 | 引用 Post:2020-06-15 20:18

    I’ll right away take hold of your rss feed as I can’t to find your email subscription link
    or newsletter service. Do you have any? Please let me
    understand so that I may subscribe. Thanks.

发表评论