# 08.1 关于UNIX进程

严格讲，**进程**是一个执行环境，包含指令，用户数据，系统数据和运行中获取的资源。另外，**程序**是一个二进制文件，包含指令和初始化指令时用到的数据，还有进程的用户数据。每次运行进程都被一个无符号整数唯一标识，它叫做**进程 ID**。

进程有三种分类：用户进程，守护进程，内核进程。**用户进程**运行在用户空间并且通常没有特殊访问权限。**内存进程**仅在内存空间执行并且可以完全访问所有内存数据结构。**守护进程**是运行在用户空间的程序并且运行在后台不需要一个终端。

> *C 调用* `fork()` *创建新进程。* `fork()` *的返回值用于程序员在父进程和子进程之间进行分辨。相反，Go 不支持类似功能而是提供 goroutines*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wskdsgcf.gitbook.io/mastering-go-zh-cn/08.0/08.1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
