Detailed description of interruptions and exceptions (1) and detailed description of interruptions (

Source: Internet
Author: User

Detailed description of interruptions and exceptions (1) and detailed description of interruptions (

There are a total of 256 types of exceptions or interruptions on Intel x86, that is, commonly referred to as interrupt vectors, which have their respective interrupt type codes. The distribution is as follows:

0-31

Abnormal and unshielded interruptions

32-47

The shielding interruption caused by the I/O device is described in the book as the 8259A microcontroller to handle other interruptions other than the 34

48-255

The identifier is Soft Interrupt. in linux, only the 128 (0x80) is used for system calling. In user mode, int 0x80 Assembly is executed, cpu is switched to kernel mode, and system_call () function is executed.

 

There are two types of unexpected situations when the cpu runs commands.

Inside CPU

Cpu internal problems must be handled immediately, so they are called exceptions;

CPU external

If a problem occurs outside the cpu, you can avoid immediate processing. Therefore, you can distinguish between shielded and unshielded interruptions.

 

 

For ease of management, exceptions and unshielded interruptions are handled as exceptions. Such problems have special exception handling programs, which are the problems to be solved by linux.

0-17 is an intel-defined exception. Except for 3, 4, 5 (and the following 128), the number is stuck (left for system calls). All the others are faults, and the cpu cannot run, so it must be processed.

18-31 indicates future cpu reservation

32-47 response by 8259A, corresponding to the following IRQ0-IRQ15, 34 interrupt that is IRQ2 don't know what to do

There is also a 128 Soft Interrupt System Call

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.