answersLogoWhite

0


Best Answer

The CPU does not "know" it is not a thinking being. What happens is that the interrupt flag ( a binary true or false register) is detected by the operating system which is being executed by the CPU and the code of the operating system runs a routine in response.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When the mouse initiates a hardware interrupt to the CPU how does the CPU know?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

When devices interrupt occurs how does the processor determine which device issued the interrupt?

It's pretty simple. First, the processor must determine which interrupt occurred. On simple hardware setups, you may already know this just by which interrupt handler was called. On more complex hardware, you may have to read status registers in the interrupt controller. Second, the processor has to look up which devices are capable of asserting that interrupt. On simple hardware, generally there is only one device that can trigger each interrupt and this is determined by the way the device is wired. On more complex devices, this may be determined by software and the processor may have to consult tables that were created during the boot process. Third, the processor must determine which of those devices actually asserted the interrupt (if there's more than one). This is typically done by the driver for each device which generally just asks the device if it triggered an interrupt. Most devices have status registers that either directly tell you whether it caused an interrupt or tell you whether the device needs service which was the point of the interrupt anyway.


What feature can interrupt The sides of a composite volcano?

Without seeing what the features are it is difficult to know the correct answer. Someone would need to know what the features are to know which is may interrupt a volcano.


What are Interrupts and their types?

In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.A hardware interrupt causes the processor to save its state of execution and begin execution of an interrupt handler. Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to an interrupt handler similar to a hardware interrupt.Interrupts are a commonly used technique for computer multitasking, especially in real-time computing. Such a system is said to be interrupt-driven.An act of interrupting is referred to as an interrupt request (IRQ).Types of Interrupts1. Level-triggeredA level-triggered interrupt is an interrupt for which an unserviced interrupt is indicated by a particular state, high level or low level, of the interrupt request line. A device wishing to signal an interrupt drives the line to its active level, and then holds it at that level until serviced. It ceases asserting the line when the CPU commands it to or otherwise handles the condition that caused it to signal the interrupt.2. Edge-triggeredAn edge-triggered interrupt is an interrupt signalled by a level transition on the interrupt line, either a falling edge (high to low) or a rising edge (low to high). A device wishing to signal an interrupt drives a pulse onto the line and then releases the line to its inactive state. If the pulse is too short to be detected by polled I/O then special hardware may be required to detect the edge.Edge-triggered interrupts do not suffer the problems that level-triggered interrupts have with sharing. Service of a low-priority device can be postponed arbitrarily, and interrupts will continue to be received from the high-priority devices that are being serviced. If there is a device that the CPU does not know how to service, it may cause a spurious interrupt, or even periodic spurious interrupts, but it does not interfere with the interrupt signalling of the other devices. However, it is fairly easy for an edge triggered interrupt to be missed - for example if interrupts have to be masked for a period - and unless there is some type of hardware latch that records the event it is impossible to recover. Such problems caused many "lockups" in early computer hardware because the processor did not know it was expected to do something. More modern hardware often has one or more interrupt status registers that latch the interrupt requests; well written edge-driven interrupt software often checks such registers to ensure events are not missed.3. HybridSome systems use a hybrid of level-triggered and edge-triggered signalling. The hardware not only looks for an edge, but it also verifies that the interrupt signal stays active for a certain period of time. A common use of a hybrid interrupt is for the NMI (non-maskable interrupt) input. Because NMIs generally signal major -- or even catastrophic -- system events, a good implementation of this signal tries to ensure that the interrupt is valid by verifying that it remains active for a period of time. This 2-step approach helps to eliminate false interrupts from affecting the system.4. Message-signaledMain article: Message Signaled InterruptsA message-signalled interrupt does not use a physical interrupt line. Instead, a device signals its request for service by sending a short message over some communications medium, typically a computer bus. The message might be of a type reserved for interrupts, or it might be of some pre-existing type such as a memory write.Message-signalled interrupts behave very much like edge-triggered interrupts, in that the interrupt is a momentary signal rather than a continuous condition. Interrupt-handling software treats the two in much the same manner. Typically, multiple pending message-signalled interrupts with the same message (the same virtual interrupt line) are allowed to merge, just as closely spaced edge-triggered interrupts can merge.5. DoorbellIn a push button analogy applied to computer systems, the term doorbell or doorbell interrupt is often used to describe a mechanism whereby a software system can signal or notify a computer hardware device that there is some work to be done. Typically, the software system will place data in some well known and mutually agreed upon memory location(s), and "ring the doorbell" by writing to a different memory location. This different memory location is often called the doorbell region, and there may even be multiple doorbells serving different purposes in this region. It's this act of writing to the doorbell region of memory that "rings the bell" and notifies the hardware device that the data is ready and waiting. The hardware device would now know that the data is valid and can be acted upon. It would typically write the data to a hard disk drive, or send it over a network, or encrypt it, etc


How do you know if a baby mouse is a mouse?

Is the mother a mouse? Is the father a mouse? Then yes, it is a mouse.


What are the types of hardware and software?

Hardware is any part of the computer you can touch it's type of hardware is i dont know


You want know the details of hardware and networking?

You want know the details of hardware and networking?


What is interrupt in assembly language?

An interrupt (for example, Intel-based opcode 0xCD) causes the CPU to pause its current execution, store the state of the registers on the stack, then process a defined subroutine. When this subroutine completes, the interrupt finishes, the registers are restored from the stack, and the previous execution state resumes. Interrupts come in two basic flavors: hardware and software. A hardware interrupt occurs when a connected piece of hardware raises an IRQ signal. This mechanism tells the CPU that the hardware has information that needs to be processed. This is more efficient than polling for devices that have relatively few inputs or that have a latency that the CPU shouldn't wait for. Keyboards and mice are often interrupt-driven; the CPU only needs to know when something interesting has happened (a key was pressed or the mouse was moved, for example). Hard drives are also interrupt-driven; this allows the hard drive to locate the requested data and then return that data some CPU cycles later without the CPU having to request the status of the operation repeatedly. In contrast, a software interrupt is usually triggered by software as a means of invoking operating system code in a reliable manner. For example, in MS-DOS, a developer would call INT 0x21 in order to invoke typical DOS commands, such as reading or writing a file, obtaining keyboard input, and other basic operations. Most older operating systems running on Intel-compatible processors use software interrupts to provide a way for the program to access system functions. Newer operating systems use new opcodes that circumvent the need for software interrupts, although most platforms still provide this mechanism for legacy software.


How does a computers mouse know you have moved it?

you have to move the mouse


What is a mouse's phylum?

don't know about water mouse, but the phylum of sea mouse is Annelida


How do you calibrate your mouse?

if your mouse have a litlle ball in it you have to take the ball andd clean the mouse but if the mouse have a lassser i dont know


What is it called to interrupt in a basketball game?

i believe its called interference i know the spellings wrong


How do you know if it's a breakup or just a break?

The only way to find out is to ask the person who initiates the breakup.