What is the execution process of Linux system calls?

Source: Internet
Author: User
What is the execution process of a Linux System Call-general Linux technology-Linux programming and kernel information? For details, refer to the following. When the system calls a function, the system calls the function to execute the int 0x80 interrupt command. At the same time, the system call number is put into the eax register and the parameters to be passed to the system are put into ebx, ecx, in edx. The interrupt handler executes the system_call () function.

The system_call () function first saves the original register and pushes the call parameters to the stack. Then, point ds and es to the kernel data segment. When the cs segment is interrupted, the segment selection character of the interrupt gate is assigned to the kernel code segment, and the original segment selection character is saved to the stack. Then, call the corresponding function. When a function is returned, the kernel checks the running status of the current task. if the task is not in the ready state, the scheduling program is executed. If the system is in the ready state but the time slice is used up, the scheduling program is also executed. When the task continues to be executed, the signal is processed and then returned to the system call function.
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.