update report

This commit is contained in:
hustccc 2020-12-24 19:42:09 +09:00
parent a63d471791
commit b798b7a99e
1 changed files with 8 additions and 9 deletions

View File

@ -200,15 +200,14 @@ marp: true
---
## **用户多进程**
+ `proc.c` & `trap.c` & `trampoline.S` & `swtch.S`
+ void proc_init():初始化进程队列
+ void userinit():初始化第一个用户进程
+ void scheduler():进行进程调度
+ void swtch(struct context*, struct context*):上下文切换
+ void forkret()
+ void usertrapret()
+ `trampoline.S` 里面的 `userret`
+ 时钟中断的时候会调用 `swtch`
+ [移植文档](https://github.com/SKTT1Ryze/xv6-k210/wiki/Process-Management)
+ 内核维护一个进程队列
+ 每个进程拥有独立的页表和独立的用户态空间
+ 在 scheduler() 进行进程调度
+ 通过 swtch(struct context*, struct context*) 进行上下文切换
+ 每次时钟中断内核会调用 yield() 函数,这个函数里面调用 swtch 进行进程切换
+ 双核跑多进程
+ 目前的用户进程是写死在内核里面的,后面文件系统移植好了才能真正意义上跑用户进程
+ 移植文档: https://github.com/SKTT1Ryze/xv6-k210/wiki/Process-Management
---
## **用户多进程**