Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

博客提交 #126

Merged
merged 4 commits into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
title: 2023开源操作系统训练营第二阶段总结报告-Beavercat7.md
date: 2023-11-02 11:21:15
tag: - author:Beavercat7
tag:
-author: Beavercat7
---


这是我第一次参加这种形式的训练营,感觉相当于收获而已,这种体验更让我有强烈的兴奋感,希望借此机会多接触开源,在开源社区中不断精进自己的技术。
在lab1中,利用结构体TaskInfo来追踪一个进程的任务状态,分别调用了哪些系统调用,以及对应的次数,距离任务第一次被调用的时长,然后来完成sys_task_info,这个相对简单,只要了解系统调用的大致流程就行,知道add_syscalltimes要放在syscall函数体内,知道大致代码框架就能写出来。
但是最重要的是,问答题检测了你对于特权级切换的理解,这里才是本章的重点和难点。利用汇编语言操作寄存器。
Expand All @@ -11,6 +15,3 @@ tag: - author:Beavercat7
在lab3中,sys_spawn主要看fork+exec来仿照写,这里不必像fork一样复制父进程的地址空间,是因为exec本身就要替代原进程(包括地址空间),没必要了。
然后stride调度算法,首先在TaskBlock添加优先级和stride,首先要把所有
初始化和要更新的加上一个stride更新,其次在task.add中,维护一个单调递增的队列。


---