读书笔记系列 - Operating Systems: Three Easy Pieces - Virtualization - Chapter 5: Process API

简介: 读书笔记系列 - Operating Systems: Three Easy Pieces - Virtualization - Chapter 5: Process API

5. Process API

  1. UNIX presents one of the most intriguing ways to create a new process with a pair of system calls: fork() and exec().

5.1 The fork()System Call

  1. The fork() system call is used to create a new process.
  2. The CPU scheduler determines which process runs at a given moment in time.


5.2 The wait() System Call

5.3 Finally, The exec() System Call

  1. This exec() system call is useful when you want to run a program that is different from the calling program.

5.4 Why? Motivating The API

5.5 Process Control And Users


  1. Beyond fork(), exec(), and wait(), there are a lot of other interfaces for interacting with processes in UNIX systems.
  2. The kill() system call is used to send signals to a process, including directives to pause, die, and other useful imperatives.

5.6 Useful Tools

5.7 Summary

  1. Each process has a name; in most systems, that name is a number known as aprocess ID (PID).
  2. The fork() system call is used in UNIX systems to create a new process. The creator is called the parent; the newly created process is called the child. As sometimes occurs in real life, the child process is a nearly identical copy of the parent.
  3. The wait() system call allows a parent to wait for its child to complete execution.
  4. The exec() family of system calls allows a child to break free from its similarity to its parent and execute an entirely new program.
  5. A UNIX shell commonly uses fork(), wait(), and exec() to launch user commands; the sparation of fork and exec enables features like input/output redirection, pipes, and other cool features, all without changing anything about the programs being run.
  6. Process control is available in the form of signals, which can cause jobs to stop, continue, or even terminate.
  7. Which processes can be controlled by a particular person is encapsulated in the notion of a user; the operating system allows multiple users onto the system, and ensures users can only control their own processes.
  8. A super user can control all processes (and indeed do many other things); this role should be assumed infrequently and with caution for security reasons.


目录
相关文章
|
存储 SQL Shell
【OSTEP】Abstraction Process | 进程 | 虚拟化 | 进程API
【OSTEP】Abstraction Process | 进程 | 虚拟化 | 进程API
63 0
|
API C# Windows
C#实现操作Windows窗口句柄:常用窗口句柄相关API、Winform中句柄属性和Process的MainWindowHandle问题【窗口句柄总结之三】
本篇主要介绍一些与窗口句柄相关的一些API,比如设置窗口状态、当前激活的窗口、窗口客户区的大小、鼠标位置、禁用控件等,以及介绍Winform中的句柄属性,便于直接获取控件或窗体句柄,以及不推荐...
3592 0
C#实现操作Windows窗口句柄:常用窗口句柄相关API、Winform中句柄属性和Process的MainWindowHandle问题【窗口句柄总结之三】
|
开发工具
The emulator process for AVD Pixel_API_30 was killed.
The emulator process for AVD Pixel_API_30 was killed.
The emulator process for AVD Pixel_API_30 was killed.
|
开发工具 Android开发
Error while waiting for device: The emulator process for AVD Pixel_API_30 has terminated.
Error while waiting for device: The emulator process for AVD Pixel_API_30 has terminated.
3615 0
Error while waiting for device: The emulator process for AVD Pixel_API_30 has terminated.
|
开发工具 Android开发
Error while waiting for device: The emulator process for AVD Pixel_2_XL_API_28 was killed.
Error while waiting for device: The emulator process for AVD Pixel_2_XL_API_28 was killed.
1088 0
Error while waiting for device: The emulator process for AVD Pixel_2_XL_API_28 was killed.
|
测试技术
SAP LSMW Error in method CL_API_MASTER_CONDITION_MM => PROCESS
SAP LSMW 导入Open SA数据,Error - System error (error in method  CL_API_MASTER_CONDITION_MM => PROCESS)    【e...
1940 0
|
Linux API 虚拟化
Virtualization API之libvirt
The virtualization API 之开源 libvirt探究 By Ruiy: libvirt supports Hypervisors(注,相关的hypervisors项目的权威网站已经加入到链接中,感兴趣探究): The KVM/QEMU Linux hypervisor The Xen hypervisor on Linux and Solaris hosts.
812 0
|
JavaScript Shell Linux
node.js入门 - 12.api:进程(process)
  虽然node对操作系统做了很多抽象的工作,但是你还是可以直接和他交互,比如和系统中已经存在的进程进行交互,创建工作子进程。node是一个用于事件循环的线程,但是你可以在这个事件循环之外创建其他的进程(线程)参与工作。
928 0
|
5天前
|
API PHP 开发者
速卖通商品详情接口(速卖通API系列)
速卖通(AliExpress)是阿里巴巴旗下的跨境电商平台,提供丰富的商品数据。通过速卖通开放平台(AliExpress Open API),开发者可获取商品详情、订单管理等数据。主要功能包括商品搜索、商品详情、订单管理和数据报告。商品详情接口aliexpress.affiliate.productdetail.get用于获取商品标题、价格、图片等详细信息。开发者需注册账号并创建应用以获取App Key和App Secret,使用PHP等语言调用API。该接口支持多种请求参数和返回字段,方便集成到各类电商应用中。
|
3天前
|
JSON 前端开发 API
以项目登录接口为例-大前端之开发postman请求接口带token的请求测试-前端开发必学之一-如果要学会联调接口而不是纯写静态前端页面-这个是必学-本文以优雅草蜻蜓Q系统API为实践来演示我们如何带token请求接口-优雅草卓伊凡
以项目登录接口为例-大前端之开发postman请求接口带token的请求测试-前端开发必学之一-如果要学会联调接口而不是纯写静态前端页面-这个是必学-本文以优雅草蜻蜓Q系统API为实践来演示我们如何带token请求接口-优雅草卓伊凡
25 5
以项目登录接口为例-大前端之开发postman请求接口带token的请求测试-前端开发必学之一-如果要学会联调接口而不是纯写静态前端页面-这个是必学-本文以优雅草蜻蜓Q系统API为实践来演示我们如何带token请求接口-优雅草卓伊凡

热门文章

最新文章