- 7
- 0
- 约3.78万字
- 约 92页
- 2019-04-20 发布于湖北
- 举报
Linux Operating System 許 富 皓 Chapter 10 System Calls System Call Operating systems offer processes running in User Mode a set of interfaces to interact with hardware devices such as the CPU disks and printers. Unix systems implement most interfaces between User Mode processes and hardware devices by means of system calls issued to the kernel. POSIX APIs vs. System Calls An application programmer interface is a function definition that specifies how to obtain a given service A system call is an explicit request to the kernel made via a software interrupt. From a Wrapper Routine to a System Call Unix systems include several libraries of functions that provide APIs to programmers. Some of the APIs defined by the libc standard C library refer to wrapper routines (routines whose only purpose is to issue a system call). Usually, each system call has a corresponding wrapper routine, which defines the API that application programs should employ. APIs and System Calls An API does not necessarily correspond to a specific system call. First of all, the API could offer its services directly in User Mode. (For something abstract such as math functions, there may be no reason to make system calls.) Second, a single API function could make several system calls. Moreover, several API functions could make the same system call, but wrap extra functionality around it. Example of Different APIs Issuing the Same System Call In Linux, the malloc( ) , calloc( ) , and free( ) APIs are implemented in the libc library. The code in this library keeps track of the allocation and deallocation requests and uses the brk( ) system call to enlarge or shrink the process heap. P.S.: See the section Managing the Heap in Chapter 9. The Return Value of a Wrapper Routine Most wrapper routines return an integer value, whose meaning depends on the corresponding system call. A return value of -1 usually indicates that the kernel was unable to satisfy the process request. A failur
您可能关注的文档
- CCAA组织召开《认证机构管理办法》宣贯培训.doc
- CVD 涂层.pdf
- delphi+ACCESS工资管理系统设计(源代码+可执行程序+论....doc
- diàn甸.ppt
- E 类模考医学基础部分(答案+解析) 单选题.pdf
- e络盟杯第二届上海交通大学智能车竞赛.doc
- FXD106航插式温度传感器.doc
- GIScience 专题演讲.pdf
- Github数据收集.pptx
- GMP、SSOP在HACCP体系运行的.doc
- 全过程工程管理造价咨询工程监理项目服务方案投标方案(技术部分).doc
- 招标代理服务投标技术服务方案(技术方案).doc
- AI大模型与AIGC技术在公安领域的应用解决方案(99页 PPT).pptx
- 工业4.0智能制造数字工厂规划方案.pptx
- 树立社会主义核心价值观.docx
- 三年(2023-2025)中考历史真题分类汇编(全国)专题21 科技文化与社会生活(解析版).docx
- 2025年中考道德与法治真题完全解读(吉林卷).pdf
- 2025年中考道德与法治真题完全解读(安徽卷).pdf
- 三年(2023-2025)中考历史真题分类汇编(全国)专题14 人民解放战争(解析版).pdf
- 三年(2023-2025)广东中考历史真题分类汇编:专题03 中国近代史(八年级上册)(解析版).docx
最近下载
- 《基因组学》(第4版)-复旦大学 14-第7章 基因的转录调控-PolI和PolIII类基因.pptx VIP
- 《基因组学》(第4版)-复旦大学 13-第6章 基因组解剖-原核生物及细胞器基因组.ppt VIP
- 19.1.1.1 常量与变量 人教版数学八年级下册同步练习(含答案).docx VIP
- 《基因组学》(第4版)-复旦大学 28-第11章 基因组复制-真核生物.ppt VIP
- 希沃白板运用培训ppt课件.pptx
- 《基因组学》(第4版)-复旦大学 3-第1章 基因组-DNA RNA 蛋白质.ppt VIP
- 《基因组学》(第4版)-复旦大学 32-第13章 基因组进化的模式-基因水平的进化.pptx VIP
- 《输变电工程建设前期手续清单》.doc VIP
- 2023-2024学年广东省中山市高二(上)期末考试物理试卷+答案解析.pdf VIP
- 不锈钢轨道车辆激光焊技术规范.docx VIP
原创力文档

文档评论(0)