How Hardware tells the CPU what to perform


A CPU may be the old woman who lived inside a shoe of computing. This mother did not know what to do because she didn't devise a technique of responding towards the demands of all her kids. She could have borrowed one of two methods from computing: polling and interrupts. With polling, she would have gone from kid to child endlessly, asking if she could do something for them. If one needed some thing, the other kids would require to wait till that job was completed, even if they had an urgent have to use the bathroom. Not really efficient. With interrupts, Mother would go about her work till a kid tugs at her apron, asking for some thing. The interruption gets her immediate attention, at least till 1 more child needs some thing. In computers, as in shoe houses, interrupts are the preferred technique of handling requests from software and hardware.

When you press the A key, an electrical signal travels along a circuit, which serves to identify what crucial you pressed, to the keyboard controller.

The keyboard interrupt arrives on one of 16 interrupt request (IRQ) lines. Seven of the IRQs monitor specific components, such simply because the keyboard controller.

The controller relays a signal to some subsystem called the interrupt controller, which acts as ch ief-of-staff, running interference between the CPU and also the 256 feasible kinds of interrupts that clamor for that CPU's attention. 1 other interrupt circuits keep an eye on the input/output bus, which includes the computer's expansion slots. Much more than one expansion cord on the Peripheral Component Interconnect (PCI) and PCI-Express slots can use the exact same IRQ because the requests are managed through the Plug-and-Play function.

The interrupt controller sends a signal to one of the pins sticking out of the bottom from the CPU called the INTR, used for normal interrupt signals.

(There'S 0150 a pin called NMI, for nonmaskable interrupt. INTRs could be interrupted by other interrupts; NMls, this kind of simply because the one generated by pressing Ctrl+AIt+Del, can't.)

The CPU puts what ever it was performing on hold. This requires the type of a memory address written to some stack. The tackle is akin to some bookmark, later reminding the CPU exactly where it left away from its previous job.

The CPU checks another pin to discover out what key you pressed. But rather than show the letter for that key on the screen, the CPU checks a section of memory called the interrupt descriptor table (lOT). Particularly, the CPU performs the directions at one of the IDr's locations associated with the A key.

Like the next clue inside a treasure hunt, the directions, called an interrupt service routine (ISR), inform the CPU what to perform when someone presses the A crucial. This allows programmers to replace the normal directions (display an A) with operations peculiar to a program. Inside a game, for instance, pressing the A key could make a character move to the left, W to create the character proceed up, and so on.

When the ISR completes its job, it sends a return from interrupt (RET) instruction towards the CPU. That tells the CPU it's free to return to whatever it was performing before it had been interrupted. The CPU pulls the last memory location it had been working with off the stack and processes the subsequent instructions from that address.

Legal Disclaimer

Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.


This article was sent to us by: Torra Gregorian at 08312010

Related Articles

1. About Ipods and Iphones
The capacity of ipods to store information up to 80 GB has made ideal choice to use it in mobility. The storage of 20000 songs is too much even for a music buff so most o...

2. Tips for using the PSP
General Tips 1. Turn on / Turn off the PSP When you want to turn off the PSP, you need to push button "Power" upward and keep it pushed for...

3. Computer Repairs: 8 Tips for Emergencies
Under the best circumstances, you buy a PC, let the experts install it all in your home, and you use it without problems. This might be true for the first period that you h...

4. Install a PCI Network Adapter
1. After purchasing the PCI adapter, turn off your desktop computer and disconnect all power and other cables from it. 2. Open the PC chassis. Check your ...

5. HEWLETT PACKARD MODULAR PDU 24A low voltage 252663 D71
The Hewlett-Packard HP products are robust, high performer made to fulfill the needs and requirements of the customers. HP provides its users with a wide range of efficie...

6. HP rack mounting kit 248931 B21
It has been the highlight of Hewlett-Packard HP products that they are robust, high performer. HP provides its users with a wide range of efficient solutions to its custo...

7. HP Baying kit 248929 B21
It has been the highlight of Hewlett-Packard HP products that they are robust, high performer. HP provides its users with a wide range of efficient solutions to its custo...