4 operating system calls

Copyright Notice: Copyright: @@ individual all https://blog.csdn.net/y20_20/article/details/91357386

OS system calls

table of Contents

First, what is the system call, the system calls the role
Second, the difference between system calls and library functions
Third, the system calls the process behind

First, what is the role of system calls, system calls

1, the operating system and hardware as the user interface, providing easy to use up some of the services, including command interface and programming interface, wherein the program interface consists of a set of system calls composition
2, the user interface:

  • Command interface: online command interface (users say the system do a); offline Command Interface (say a bunch of system users to do a bunch)
  • Interface: by a group consisting of system calls, used by a program indirectly

3, system calls: System calls are provided to the operating system application program interface (programmer) used to be understood that the system emits a special function, the application of an alternative application calls the operating system to get the call request service
4, Why use a system call function?

  • And all operations related resources, must request services through system calls to the operating system, the operating system on behalf of completion (service coordination and management processes requests)
  • Benefits: to ensure the stability and security of the system, to prevent users from illegal operations

5, the system call classification (by Function)

  • Device Management: complete equipment such as requesting the release and start function
  • File management: file is created, deleted, read and write functions
  • Process Control: Create complete the process of withdrawal, clogging and wake-up functions
  • Process Communication: signaling and messaging functions between the completion of the process
  • Memory management: Complete memory allocation and recovery functions
  • Note: The correlation processing system calls related to the management of system resources, control of the process, need to perform some privileged instructions to complete, therefore, related processing system calls need to be in kernel mode

Second, the difference between system calls and library functions

  • Ordinary applications: can directly use the system call, you can also use the library functions, related to the library system calls (file creation), it does not involve the library system calls (absolute value function)
  • Programming language: providing up library function, the system calls the library function into the package
  • Operating System: The system provides up call
  • Bare metal

Third, the system calls the process behind

1, the system calls the process
System calls

2, the system calls a summary map
System call knowledge summary

Guess you like

Origin blog.csdn.net/y20_20/article/details/91357386