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.
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
1. About Ipods and Iphones
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved. Partners: Gunblade Saga