# 实验 5：Cache Lab

## 实验附件

* README
  * <http://csapp.cs.cmu.edu/3e/README-cachelab>
* Writeup
  * <http://csapp.cs.cmu.edu/3e/cachelab.pdf>
* 版本历史
  * <http://csapp.cs.cmu.edu/3e/cachelab-release.html>
* 自学材料
  * <http://csapp.cs.cmu.edu/3e/cachelab-handout.tar>

## 实验简介

CMU 用该实验替代 Performance Lab。学生编写一个通用缓存模拟器，然后优化一个小矩阵转置内核，从而最小化模拟缓存上的未命中次数。这个实验室使用 Valgrind 工具来生成地址踪迹（address traces）。

注意：该实验室必须运行在 64位 x86-64 系统上。


---

# 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://hansimov.gitbook.io/csapp/labs/cache-lab.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.
