Linux calls are implemented with interruptions.

Source: Internet
Author: User

Linux system calls are implemented with interruptions. linux system calls are not completed directly in the user's process space as normal function calls. They are implemented through interruptions, namely: issue interrupt + call interrupt service program. Www.2cto.com uses the x86 system as an example. before executing a system call, the user process first places the system call name (actually the system call number) and input parameters on the register (such as EBX and ECX. then, the int 0x80 command is issued to trigger the 128 interrupt 3. the system suspends the user process and finds the interrupted service program based on the 128 interruption. The program name is system_call () 4. system_call () is then executed. It finds the system call name and input parameters in the Register, and finds the process that triggers the system call according to the system call context. After the execution, it puts the output result into the register. 5. The system restores the user process, the process obtains what it wants from the Register, and then continues to execute. Note: System Call interruptions are generally referred to as soft interruptions.

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.