Skip to content

Commit

Permalink
proj 3 note
Browse files Browse the repository at this point in the history
  • Loading branch information
AstatineAi committed May 8, 2024
1 parent 9838afe commit 81fba09
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
55 changes: 55 additions & 0 deletions lecture_note/docs/pintos/proj3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Project 3: Virtual Memory

!!! warning "No plagiarism"
If you are enrolled in CS130, you may not copy code from this repository.

!!! warning "急了急了急了"
Project 3 基于 Project 2, 希望你的 Project 2 足够 robust.

!!! note "Overview"
- Task 1 : paging
- Task 2 : stack growth
- Task 3 : memory mapping files
- Task 4 : swapping
- Task 5 : accessing user memory

## 文件系统限制依然存在

- 可能并发访问一个文件, 考虑加锁
- 文件大小固定, 控制文件名长度不超过 14 字符

## 分析

空啊, 很空啊 (指 vm 文件夹).

`Make.vars` 里面添加了宏定义 `VM`, 可以像之前的 `#ifdef USERPROG` 一样使用.

新增的 `.c` 文件需要在 `Makefile.build` 里面添加到 `vm_SRC`.

在有虚拟内存时, page fault 有更多种情况

- 访问的虚拟地址合法
- 没有对应的页
- 对应的页没有载入内存
- 访问的虚拟地址非法
- 中止, 防止操作系统崩溃

## Task 1



## Task 2



## Task 3



## Task 4



## Task 5


1 change: 1 addition & 0 deletions lecture_note/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ nav:
- pintos:
- Project 1: 'pintos/proj1.md'
- Project 2: 'pintos/proj2.md'
- Project 3: 'pintos/proj3.md'
# - 其他笔记:

0 comments on commit 81fba09

Please sign in to comment.