# 1.3 计算机的性能指标

## 1.3.1 主要性能指标

### 1、主存容量

$$
总容量 = 存储单元个数 \* 存储字长 (bit) \\
\= 存储单元个数\*存储字长/8 (byte，B)
$$

* MAR的位数：反应存储单元的个数，即 $$2^{n}$$ 个存储单元（n为位数）；
* MDR的位数：等于**存储字长**。

例：主存容量为64K\*32位，即MAR位数为16位，MDR位数为32位。

{% hint style="info" %}
$$2^{10}:K\2^{20}:M\2^{30}:G\2^{40}:T$$&#x20;
{% endhint %}

### 2、机器字长

计算机进行**一次整数运算**所能处理的二进制数据的位数。

{% hint style="info" %}
机器字长、指令字长、存储字长的区别和联系：P24
{% endhint %}

### 3、CPU时钟周期和主频

**CPU时钟周期**：CPU中最小的时间单位，每个动作至少需要一个时钟周期。

**主频（CPU时钟频率）**：机器内部主时钟的频率，主频越高，计算机运行速度越快。

$$
CPU时钟周期 = \frac{1}{主频}
$$

### 4、CPI

**CPI（Clock cycle Per Instruction）**：执行一条指令所需的时钟周期。

$$
指令执行的时间 = CPI \* CPU时钟周期
$$

### 5、CPU执行时间

CPU执行时间，即整个程序的执行时间。

$$
\begin{align}
CPU执行时间 &= (平均CPI \* 指令条数) \* CPU时钟周期 \\
&= \frac{CPU时钟周期数}{主频}
\end{align}
$$

### 6、MIPS、MFLOPS、GFLOPS和TFLOPS

**MIPS (Million Instructions Per Second)**：每秒执行多少百万条指令。

$$
MIPS=\frac{指令条数}{(执行时间 \* 10^{6})}=\frac{主频}{CPI}
$$

**MFLOPS ( Mega Floating point Operations Per Second)**：每秒执行多少百万次浮点运算。

$$
MFLOPS=\frac{浮点操作次数}{(执行时间 \* 10^{6})}
$$

**GFLOPS ( Giga Floating point Operations Per Second)**：每秒执行多 少十亿次浮点运算。

$$
GFLOPS=\frac{浮点操作次数}{(执行时间 \* 10^{9})}
$$

**TFLOPS (Tera Floating -point Operations Per Second)**：每秒执行多少 万亿次浮点运算。

$$
TFLOPS=\frac{浮点操作次数}{(执行时间 \* 10^{12})}
$$

## 1.3.2 其他相关术语

### 1、吞吐量和响应时间

**吞吐量**：系统在单位时间内处理请求的容量

**响应时间**：从用户发出请求到系统响应请求并得到结果的时间，包括CPU运行时间和等待时间。

### 2、数据通路带宽

数据总线一次能并行传输数据的位数。


---

# 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://aye10032.gitbook.io/computerorganizationnote/di-yi-zhang-ji-suan-ji-xi-tong-gai-shu/1.3-ji-suan-ji-de-xing-neng-zhi-biao.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.
