Interrupts, exceptions, and system calls

Source: Internet
Author: User

System call: A service request that the application makes to the operating system. (Asynchronous or synchronous)

Exception: An illegal instruction or other reason that causes the current instruction to execute after a failed processing request. Synchronization

Interrupt: A processing request from a hardware device. Asynchronous

Interrupt handling mechanism:

1.CPU initialization interrupt enable, that is, to set the processing of different interrupts corresponding to the process.

2. Hardware: Set interrupt flag, an interrupt vector call the corresponding interrupt service routine (in the interrupt vector table, and then call the exception service routine or system invoke service routine or interrupt service routine)

3. Software: On-site storage (compiler Work)

Interrupt service processing (handled by the appropriate service routines for the above work)

Clear interrupt Token (service routine)

On-site recovery (compiler Work)

System call: Program Access invokes the system call method through a high-level API (C,c++,java library, etc.), rather than invoking the system call interface directly.

function calls and system calls use different stacks, divided into user states and kernel states.

Example: Customers go to the bank to withdraw money, the salesperson from the safe, and then handed over to the customer. Not the customer to take the money in the safe.

      

Interrupts, exceptions, and system calls

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.