xv6

wunaiqiezixin8 天前
linux·unix·os·xv6·mit6.s081
MIT 6.S081 util 实验篇(lab1):primes (moderate/hard)primes 是 util 实验里真正把 pipe + fork 组合成一条"进程流水线" 的一关,难度比 pingpong 高一档。它要我们用并发的方式实现「素数筛」——这是 Unix 管道发明者 Doug McIlroy 提出的经典并发思想:不靠任何共享内存,只用"一串进程 + 一串管道",就把 2~35 里的素数全部筛出来。
wunaiqiezixin1 个月前
linux·unix·os·xv6·mit6.s081
MIT 6.S081 file system 实验篇(lab9):Large files (moderate)给 xv6 的 inode 增加二级间接块(doubly-indirect block),把单文件上限从 268 块提升到 65803 块。
wunaiqiezixin2 个月前
linux·unix·os·xv6·mit6.s081
MIT 6.S081 xv6 源码精读(Scheduling):sched、scheduler本篇是 swtch.S 源码精读 的姊妹篇。上篇我们把 swtch 拆到字母级,知道它「存旧现场、载新现场、ret 跳到新 ra」。这篇看 proc.c 里谁在调用 swtch、怎么编排成完整调度:scheduler(调度器循环)、sched(切走原语)、yield(主动让出)、forkret(新进程首跑)。
wunaiqiezixin2 个月前
linux·unix·os·xv6·mit6.s081
MIT 6.S081 lazy 前置篇(lab5):缺页异常、惰性分配、写时复制、页面换出学习操作系统时,页表、缺页异常、写时复制、惰性分配、页面换出……这些名词往往会一股脑涌过来,让人眼花缭乱。但其实它们之间有着清晰的层级关系:缺页异常是硬件提供的基础机制,而惰性分配、写时复制、页面换出,都是操作系统利用这个机制实现的内存管理策略。
haoly19892 个月前
os·fork·xv6·文件描述符·dup
xv6-examples-输出helloworld任务:在控制台输出 “hello world”。helloworld.chelloworld2.chelloworld3.c
wunaiqiezixin2 个月前
linux·unix·os·xv6·mit6.s081
MIT 6.S081 syscall 实验篇(lab2):System call tracing (moderate)本实验要实现一个 trace 功能:跟踪某个用户程序执行过程中调用了哪些系统调用,并把每次调用的名称与返回值打印出来,格式形如 进程id: syscall 系统调用名 -> 返回值。
白狐_7985 个月前
操作系统·麒麟·xv6
【XV6操作系统】Lab2(Page Table) 满分通关与答辩指南:结合408考点深度剖析前言: 欢迎来到 XV6 系列的第二篇!在《操作系统》课程和 408 考研大纲中,“内存管理与页表” 绝对是难度最高、最抽象的压轴大戏。 本次 XV6 的 Lab2 (Page Table) 实验,要求我们亲手去遍历底层的三级页表,并通过共享物理页来加速系统调用。今天,我将以第一人称视角,带你还原我的实验答辩现场,把代码实现与 408 理论完美串联起来!
农民真快落9 个月前
操作系统·risc-v·嵌入式软件·xv6
【操作系统】手撸xv6操作系统——types.h/param.h/memlayout.h/riscv.h/defs.h头文件解析上一节介绍了xv6的entry.S和start.c,在机器上电后会首先执行boot代码,然后进入到entry.S,entry.S执行完毕后会跳转到start.c,start.c执行完成后会跳转到main函数。main函数中引入了一系列头文件,这篇文章介绍这些头文件。
小林up9 个月前
操作系统·xv6
【MIT-OS6.S081笔记5】Chapter5阅读摘要:Interrupts and device drivers
小林up10 个月前
操作系统·xv6
【MIT-OS6.S081作业5.1】Lab5-lazy page allocation-Eliminate allocation from sbrk()本文记录MIT-OS6.S081 Lab5 lazy page allocation 的Eliminate allocation from sbrk()函数的实现过程
小林up10 个月前
操作系统·xv6
【MIT-OS6.S081作业4.3】Lab4-traps-Alarm本文记录MIT-OS6.S081 Lab4 traps的Alarm的实现过程In this exercise you’ll add a feature to xv6 that periodically alerts a process as it uses CPU time. This might be useful for compute-bound processes that want to limit how much CPU time they chew up, or for processes
小林up10 个月前
操作系统·xv6
【MIT-OS6.S081作业-4-2】Lab4-traps-Backtrace本文记录MIT-OS6.S081 Lab4 traps的Backtrace函数的实现过程For debugging it is often useful to have a backtrace: a list of the function calls on the stack above the point at which the error occurred. Implement a backtrace() function in kernel/printf.c. Insert a call to
小林up10 个月前
操作系统·xv6
【MIT-OS6.S081作业-4-1】Lab4-traps-RISC-V assembly本文记录MIT-OS6.S081 Lab4 traps的RISC-V assembly的实现过程。It will be important to understand a bit of RISC-V assembly, which you were exposed to in 6.004. There is a file user/call.c in your xv6 repo. make fs.img compiles it and also produces a readable assembly v
ssslar1 年前
操作系统·risc-v·xv6
MIT XV6 - 1.6 Lab: Xv6 and Unix utilities -uptime接上文 MIT XV6 - 1.5 Lab: Xv6 and Unix utilities - xargs
ssslar1 年前
操作系统·xv6·risic-v
MIT XV6 - 1.1 Lab: Xv6 and Unix utilities - user/_sleep 是什么?做什么?接上文 MIT XV6 - 1.1 Lab: Xv6 and Unix utilities - sleep 是怎样练成的?
ssslar1 年前
操作系统·risc-v·xv6
MIT XV6 - 1.2 Lab: Xv6 and Unix utilities - pingpong接上文 MIT XV6 - 1.1 Lab: Xv6 and Unix utilities - user/_sleep 是什么?做什么?
ssslar1 年前
操作系统·risc-v·xv6
MIT XV6 - 1.1 Lab: Xv6 and Unix utilities - sleep 是怎样练成的?接上文MIT XV6 - 1.1 Lab: Xv6 and Unix utilities - sleep
ssslar1 年前
操作系统·risc-v·xv6
MIT XV6 - 1.1 Lab: Xv6 and Unix utilities - sleep接上文 MIT XV6 - 1. 环境准备打开实验链接 Lab: Xv6 and Unix utilities ,可以看到他一共有6个小实验(头大,让我们争取日拱一卒吧…):
Rinai_R1 年前
笔记·操作系统·环境搭建·计算机基础·xv6·mit6s081
MIT6.S081-2024版本的环境搭建我看网上的环境搭建版本大多是2020年,或者ubuntu20版本的,我也跟着很久没有搭建好,在下载工具链之前,我最开始直接用git去拉取哪个工具链,之后又配置了半天,发现一个比较友好的最新版本的环境搭建办法,在这里重新分享一下
Roadinforest2 年前
linux·操作系统·qemu·wsl·环境配置·xv6
wsl2配置xv6全解(包括22.04Jammy)下载好并正确进入OS源代码所在文件夹后,结构应该为最终环境:QEMU 5.1+, GDB 8.3+, GCC, and Binutils.