Brief summary of Computer principle (ii) + + Interrupt

Source: Internet
Author: User

Before we talk about the physical address of the virtual address, let's say abort.

In the previous chapter, we said that the hardware can transmit an interrupt signal to the CPU via the control bus, which has an extraordinary significance. We know that the CPU read and write speed and hardware read and write speed is not a number of levels, such as we let the hard disk to read a file, how the CPU know the hard disk read it? One way is to constantly check the status of the hardware register, to see if it is finished, this way is the poll chatter, the CPU silly to do the repetitive things, so that the CPU is meaningless occupation, in fact, think of the solution is very simple, is the CPU first to do other things, the hardware read, Self-notification CPU, tell him that he has finished, this time the CPU may be doing something else, once the hardware similar to the message, the CPU will stop the work at hand to respond to requests for hardware. Here are some questions to consider, one is that the work at hand is now stopped, and how can we continue to do it later? Very simple answer, we only need to save the current CPU execution environment, said very loaded force, straightforward, that is, as long as the current CPU to save the value of each register, and so on and then re-assign the value back on the line, the implementation of the environment is basically the value of the register. Another is that since the interruption of the message came, we have to respond to the interruption, how to respond? Where to find the interrupt program? Very simple, we just for each kind of interrupt marking, become the interrupt number, and then the interrupt number and the program corresponding, but still where to find this program? Here is a place to set up, beginning people put 00000H to 003FFH as interrupt vector table, interrupt vector can be understood as the entry address of a program, index of course is the interruption number of chatter, in fact, later people no longer rigidly set the position of the interrupt vector table, but put his starting position in a register ( IDTR) is named Interrupt descriptor table. In fact, the interrupt handler is one of the drivers, we call the interrupt processing driver, then we will talk about the driver.

Brief summary of Computer principle (ii) + + Interrupt

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.