avatar
文章
93
标签
38
分类
18
首页
归档
标签
分类
LogoHuayi
搜索
首页
归档
标签
分类

Huayi

MIT 6.S081 Lecture 8: Q&A labs
发表于2023-04-15|操作系统
pagetable lab 似乎讲解的是2020的lab,与2021的lab不同
MIT 6.S081 Lab traps
发表于2023-04-13|操作系统
Compulsory exercises Preparation reading To start the lab, switch to the trap branch 123git fetchgit checkout trapsmake clean RISC-V assembly (easy) Which registers contain arguments to functions? For example, which register holds 13 in main’s call to printf? a0-a1 a2-a7; a2 Where is the call to function f in the assembly code for main? Where is the call to g? (Hint: the compiler may inline functions.) f in printf 0x34 , g in f 0x14 At what address is the function printf located? ...
CTF
发表于2023-04-13|CTF
Introduction CTF(Capture The Flag)夺旗赛,是网络安全爱好者之间的竞技游戏。 Links CTF wiki CTFHub updating…
Shell
发表于2023-04-10|CS Tools
Introduction Shell通常是运行在操作系统用户层的一个程序,它的表现很像操作系统的外壳(Shell),它接受键盘输入并执行程序,将结果写入到标准输出流中。shell的种类很多,有bash,zsh,fish等 Common Usage(wsl) 文件和目录 ls 列出当前路径下的文件和目录 -a 列出包括隐藏文件的文件和目录 -l 列出详细信息 pwd 显示当前目录 touch <filename> 创建新文件 mkdir <dirname 创建新目录 rm <filename> 删除文件 -r 递归删除目录 -f 强制删除文件 rmdir <dirname> 删除空目录 rm -r <dirname> 删除目录下所有内容 mv src dst 移动文件或目录(重命名) find path -name patten 查找path下文件名匹配pattern的文件 cd <path> 转换工作路径 . 此目录 .. 父目录 ~ 根目录 - 切换前的目录 /...
Vim
发表于2023-04-09|CS Tools
Introduction Vim是一个类似于Vi的著名的功能强大、高度可定制的文本编辑器 Usage 参考教程 基本键位 自定义配置 vim .vimrc 插件安装 vimawesome 在.vimrc中 1234567" Plugcall plug#begin()Plug 'scrooloose/nerdtree'"Plug 'vim-jp/vim-cpp'Plug 'valloric/youcompleteme'" Plug 'wikitopian/hardmode' call plug#end()
MIT 6.S081 Lecture 10: Multiprocessors and locking
发表于2023-04-08|操作系统
Reading Read Locking read code Locks introduction apps wants to multiple cores kernel must handle parallel sys calls access shared data structure in parallel -> locks for correct sharing locks limit performance Microprocessor trend Lock abstraction struct lock 12345678// Mutual exclusion lock.struct spinlock { uint locked; // Is the lock held? // For debugging: char *name; // Name of lock. struct cpu *cpu; // The cpu holding the lock.}; 123...
MIT 6.S081 Lecture 9: Interrupts
发表于2023-04-08|操作系统
Reading Read Chapter5 read code Interrupts HW wants attention now, like keyboard and network device 系统调用,traps,interrupts都使用相同的处理模式 save its work process interrupt resume its work interrrupts的特殊之处 asynchronous异步的 concurrency between cpu and device program device Where interrupts come from? 主板上的异步接口 cpu架构 PLIC 平台级中断控制器 UART 通用异步收发器(Universal Asynchronous Receiver/Transmitter) Driver manage device 经典的驱动架构 Programming Device memory mapped I/O ld/st read/write...
Manim
发表于2023-04-06|CS Tools
Introduction Manim是数学视频博主3b1b开发并使用的Python图形引擎,用于制作数学科普视频。 Usage 基本框架 python12345from manimlib import *import numpy as npclass SceneName(Scene): def construct(self):
MIT 6.S081 Lab pgtbl
发表于2023-04-05|操作系统
Compulsory exercises Preparation reading To start the lab, switch to the pgtbl branch: 123git fetchgit checkout pgtblmake clean Speed up system calls (easy) getpid()作为系统调用,每次调用时需要跳入内核并跳出,为加速pid的获取,ugetpid()函数可以通过分配虚拟地址将pid存入其中,从而实现不跳转不trap获取pid 修改内核函数实现ugetpid() map one read-only page at USYSCALL in proc_pagetable() proc.c proc_pagetable()12345if(mappages(pagetable, USYSCALL, PGSIZE, (uint64)(p->usyscall), PTE_R | PTE_U) < 0){ uvmfree(pagetable, 0); re...
MIT 6.S081 Lecture 7: Page faults
发表于2023-04-04|操作系统
Reading Read 4.6 Implenment VM features using page fault lazy allocation copy on write fork demand paging memory mapped files Virtual Memory benefits Isolation level of indirection trampline page guard page Information needed the faulting VA -> stval register type pf fault -> scause register load store pc the VA of Instruction that cause fault -> sepc register | trampframe? lazy allocation sbrk()原本应为进程改变堆的大小,分配内存 sbrk()系统调用基本不做事情,只p->size + n ...
1…678…10
avatar
Huayi
Time to Code.
文章
93
标签
38
分类
18
Follow Me
公告
🚧施工中...
最新文章
AtCoder Beginner Contest 4192025-08-20
CSAPP bomblab2023-11-13
CSAPP datalab2023-11-11
Latex2023-11-08
Hackergame20232023-11-04
分类
  • CS Language7
  • CS Project2
  • CS Tools15
  • CTF2
  • Others1
  • 人工智能2
  • 体系结构2
  • 前端1
标签
MCU Math 8051 tmux HTML Shell CTF Git Network gdb Windows ASCII Docker Javascript Plan Python C ChatGPT OS Golang jupyter CSS Java STM32 CMake Physics C++ Linux x86 GNU Make OI Rust Markdown Github Vim Latex 0->1 RISC-V
归档
  • 八月 2025 1
  • 十一月 2023 4
  • 十月 2023 1
  • 九月 2023 3
  • 八月 2023 2
  • 七月 2023 5
  • 六月 2023 4
  • 五月 2023 20
网站信息
文章数目 :
93
本站总字数 :
32.1k
本站访客数 :
本站总浏览量 :
最后更新时间 :
© 2025 By Huayi框架 Hexo 6.1.0|主题 Butterfly 5.4.3
搜索
数据加载中