Basic concepts of System invocation

Source: Internet
Author: User

In its core, the operating system sets up a set of subroutines (i.e. procedures) for implementing various system functions for application invocation. Because of the specificity of the OS system process, the application cannot invoke these processes in a general procedure invocation, but instead use a system invoke command to invoke the desired system procedure. There are several obvious differences between it and the general process invocation.

(1) Run in a different state. General procedure invocation, both the calling program and the invoked program run in the same state as a system state or user state, while in the system call, the calling program usually runs in the user state, and the invoked program runs in the system state.

(2) The conversion of the system State. Because the general procedure call does not involve the transformation of the system State, it can be shifted directly from the calling procedure to the invoked procedure. However, when the system call is run, the calling procedure is not allowed to be directed to the invoked procedure because the call and the invoked procedure are working in different system states. Usually through the soft interrupt mechanism, first from the user state to the system state, after the kernel analysis, can turn to the corresponding system call processing subroutine.

(3) Return question. In a system with preemption (deprivation) scheduling, after the called process is executed, the priority analysis should be made to all the processes that are required to run in the system. When the calling process still has the highest Gao priority, it is returned to the calling process to continue, otherwise it will cause a rescheduling to allow the highest priority process to execute. In this inch, you need to put the calling process into the ready queue.

(4) nested calls. As with normal procedures, system calls can be nested, that is, during the execution of a called procedure, you can also invoke another system call using the system call command. Of course, each system has a certain limit on the depth of the nested call, usually no more than 6 depth. The following figure (a) shows a system call without nesting, as shown in Figure 8-8 (b) with nested 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.