understanding interrupt vector, interrupt handler, and interrupts

Posted on 2009-02-15
Last Modified: 2013-11-14
can anyone please explain to me what is the correlation between these three and how they work with each other?
Question by:kuntilanak
    LVL 12

    Accepted Solution

    In a nutshell:

    Interrupts are signals delivered by hardware to notify the processor of some actions that needs to be taken.. It's used to allow the processor to continue doing other functions while waiting for hardware instead of sitting in a polling loop.

    An interrupt vector is a location in memory associated with a specific device that contains the address of code that is to be executed when an interrupt is delivered.

    The code to be executed is called the interrup handler.

    Author Comment

    >>It's used to allow the processor to continue doing other functions while waiting for hardware instead of >>sitting in a polling loop.

    Can you elaborate on this part? I am not clear what you mean by waiting for hardware
    LVL 12

    Expert Comment

    Sure. Modern operating systems support multiple processes (programs, services,...) running simultaneously. When one of these processes makes a request that involves a piece of hardware, such as reading a block from a file on disk, there will be a delay waiting for the hardware to complete the request. Rather than waiting for the request to complete, the operating system marks the requesting process as blocked waiting for I/O to complete, and allows other processes to continue running, waiting for the disk controller to send an interrupt when the request is completed. The interrupt vector points to interrupt handler in the OS that completed the read request. At this point, the process scheduling logic in the OS usually kicks in, and the requesting process is typically made the running process again. This scheduling also happens when the hardware clock interrupt comes in (handled just like any interrupt)l, giving the OS a chance to share the CPU across all runnable processes at regular intervals in a multitasking environment.

    There are other models for handling hardware requests. Older OS's like Microsft DOS (and if you remember CP/M) do not support multitasking; when a program makes a hardware request, the computer waits until it finishes. That doesn't translate very well to multitasking, since an I/O request from one process would stall all processes while the OS polls the hardware waiting for the request to complete.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
    "Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now