用户与内核系统调用之间的区别 [英] Difference between User vs Kernel System call

查看:113
本文介绍了用户与内核系统调用之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

系统调用是程序从操作系统内核请求服务的方式.

A system call is how a program requests a service from an operating system's kernel.

它们可以在用户模式和内核模式下发生.

They can occur in user-mode and kernel-mode.

有什么区别?

例如:

  • 开销
  • 系统时间

推荐答案

系统调用是您在应用程序(用户模式")和内核之间进行过渡的方式.

A system call is the way you transition between the application ("user mode") and the kernel.

系统调用比正常的函数调用要慢,但是英特尔和AMD的新型x86芯片具有特殊的sysenter/syscall操作码,可以花100毫微秒左右的时间进行操作.

Syscalls are slower than normal function calls, but newer x86 chips from Intel and AMD have a special sysenter/syscall opcode to make it take just a hundred nanoseconds or so, give or take.

这篇关于用户与内核系统调用之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆