COA-Priority Interrupt

In a typical application, a number of I/O devices are attached to computer, with each device being able to originate an interrupt request, so to provide services to device which initiate interrupt request, the task of interrupt system is to identify the source(device) of interrupt and then provide services to them.

But, in most cases there is a possibility that several sources will request service simultaneously.So, in this case, the interrupt system must also need to decide which device to service first.But, these simple interrupt system are not able for that, so, another system known as Priority interrupt system is provided.

Priority Interrupt are systems, that establishes a Priority over the various sources(interrupt devices) to determine which condition is to be serviced first when two or more requests arrive simultaneously.This system may also determine which condition are permitted to interrupt to the computer while another interrupt is being serviced.

Usually, in Priority Systems, higher-priority interrupt levels are served first, as if they delayed or interrupted, could have serious consequences.And the devices with high-speed transfer such as magnetic disks are given high-priority, and slow devices such as keyboards receives low-priority.

Establishing Priority of Simultaneous Interrupt:


The priority of simultaneous interrupts can be established either by software method or hardware.

The software method which gives priority to simultaneous interrupt is:
  • Polling
And the hardware method which gives priority to simultaneous interrupt is:
  • Daisy-Chaining Priority
Now, we will explore to each one of them one by one.


1. Polling:

   
    Polling is the software method of establishing priority of simultaneous interrupt.In this method, when       the processor detects an interrupt, it branches to an interrupt service routine whose job is to pull each     I/O module to determine which module caused the interrupt.

    The poll could be in the form of separate command line(e.g., Test I/O).In this case, the                             processor raises the Test I/O and places the address of particular I/O module on the address                   line.If it has interrupt that is, if interrupt is identified in it.

    And, it is the order in which they are tested i.e., the order in which they appear on address                       line(Service Routine) determine the priority of each interrupt.As while testing, highest priority                   source(devices) are tested first then lower-priority devices.

    This is very simple method of establishing priority on simultaneous interrupt.But the disadvantage of       polling is that it is very time consuming.

2. Daisy-Chaining Priority:

    
    The Daisy–Chaining method of establishing priority on interrupt sources uses the hardware i.e., it is         the hardware means of establishing priority.


    In this method, all the device, whether they are interrupt sources or not, connected in a serial                   manner.Means the device with highest priority is placed in the first position, which is followed by               lowest priority device.And all device share a common interrupt request line, and the interrupt                   acknowledge line is daisy chained through the modules.

    The figure shown below, this method of connection with three devices and the CPU.


    It works  as follows:

    When any device raise an interrupt, the interrupt request line goes activated, the processor when             sense it, it sends out an interrupt acknowledge which is first received by device1.If device1 does not       need service, i.e., processor checks, whether the device has pending interrupt or initiate interrupt             request, if the result is no, then the signal is passed to device2 by placing 1 in the PO(Priority Out) of       device1.And if device need service then service is given to them by placing first 0 in the PO of                 device1, which indicate the next-lower-priority device that acknowledge signal has been blocked.And       device that have processor responds by inserting its own interrupt vector address(VAD) into the data       bus for the CPU to use during interrupt cycle.

    In this way, it gave services to interrupt source according to their priority.And thus, we can say that, it       is the order of device in chain that determine the priority of interrupt sources.

6 comments:

  1. Should any device be allowed to interrupt the CPU while another interrupt is being serviced

    ReplyDelete
  2. Hey, I got a question like 'discuss implementation of interrupt priority using individual request and acknowledge lines' in the exam. So for 10 marks how much would I get? Please reply for it 🙏🙏

    ReplyDelete
  3. Hey, I got a question like 'discuss implementation of interrupt priority using individual request and acknowledge lines' in the exam. I wrote the whole definition and working of interrupts. So for 10 marks how much would I get? Please reply for it 🙏🙏

    ReplyDelete