ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

系统调用SystemCalls-1-总述

2021-05-01 09:29:34  阅读:226  来源: 互联网

标签:总述 calls process 个小类 系统 system SystemCalls 调用


(Owed by: 春夜喜雨 http://blog.csdn.net/chunyexiyu)
参考:https://en.wikipedia.org/wiki/System_call

总述内容主要来自于wikepedia中的介绍,主要回答三个问题:

  1. 什么是系统调用?
  2. 系统调用的数目有多少?
  3. 系统调用函数的通常分类是什么?

关于系统调用

计算机中系统调用,指计算机程序执行时请求操作系统内核提供的服务。调用通常可能涉及硬件相关服务(例如涉及硬盘驱动)、或创建和执行一个新进程、或与基础内核服务通信(比如进程调度)。系统调用在进程与操作系统之间提供了一个必要的接口。
在大多数系统中,系统调用仅在用户空间进程中使用;但在一些系统如IBM的OS/360和它的继承者系统中,特权系统代码也启用了系统调用。

from wikepdia ---
In computing, a system call (commonly abbreviated to syscall) is the programmatic way in which a computer program requests a service from the kernel of the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive), creation and execution of new processes, and communication with integral kernel services such as process scheduling. System calls provide an essential interface between a process and the operating system.
In most systems, system calls can only be made from userspace processes, while in some systems, OS/360 and successors for example, privileged system code also issues system calls.

系统调用数量

在Unix、类Unix和其它POSIX兼容操作系统中,通用系统调用有open, read, write, close, wait, exec, for, exit, kill。许多现代操作系统有数百个系统调用。例如Linux和OpenBSD分别有超过300个不同的调用,NetBSD有接近500个,FreeBSD有超过500个,Win7有接近700个,而早期Plan9只有51个系统调用,MINIX只有53个系统调用。

from wikepedia ---
On Unix, Unix-like and other POSIX-compliant operating systems, popular system calls are open, read, write, close, wait, exec, fork, exit, and kill. Many modern operating systems have hundreds of system calls. For example, Linux and OpenBSD each have over 300 different calls, NetBSD has close to 500,FreeBSD has over 500,Windows 7 has close to 700, while Plan 9 has 51.

系统调用分类

在wikepedia中系统调用划分了6个大类,分别为:ProcessControl进程控制,FileManagement文件管理,DeviceManagement设备管理, InformationMaintenance信息维护,Communication通信,Protection保护 共计6个大类。

进程控制

分成6个小类

  1. create process 进程创建 (fork in unix-like os,NTCreateProcess in windows)
  2. terminal process 终止进程 (kill in unix-like os)
  3. load, execute 加载程序文件、执行程序(execve, exec in unix)
  4. get/set process attribute 获取/设置进程属性
  5. wait for time, wait event, signal event 等待时间、事件、信号
  6. allocate and free memory 分配和释放内存

文件管理

分成4个小类

  1. create file/delete file 创建/删除文件
  2. open, close 打开/关闭文件
  3. read, write, reposition 读/写/重定位
  4. get/set file attribute 获取/设置文件属性

设备管理

分成4个小类

  1. request device,release device请求设备,释放设备
  2. read, write, reposition 读/写/重定位
  3. get/set device attribute 获取/设置设备属性
  4. logically attach/detach devices 逻辑附加/去除设备

信息维护

分成2个小类

  1. get/set total system information(including time, date, computer name, enterprise etc.)获取/设置完整的系统信息。
  2. get/set process, file, or device metadata(include author, opener, creation time and date etc.) 获取/设置进程、文件、设备的元数据(描述数据的数据)。

通信

分成4个小类

  1. create, delete communication connection 创建/删除通信连接
  2. send, receive message 发送/接收信息
  3. transfer status information 转移状态信息
  4. attach/detach remote device 附加/去除远程设备

保护

1个小类:获取/设置文件权限

(Owed by: 春夜喜雨 http://blog.csdn.net/chunyexiyu)

标签:总述,calls,process,个小类,系统,system,SystemCalls,调用
来源: https://blog.csdn.net/chunyexiyu/article/details/116291735

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有