MIT6.828-Lab5-总结 文件系统杂项JOS的文件系统也是“微内核”模式,其设置文件服务进程用于处理文件操作请求。示意图如下: IOPL(I/O privilege)赋予进程操作硬盘的权限,其标识当前用户进程想要访问 IO space 需要的最低权限,示意图如下: 文件服务进程的地址空间布局JOS的文件服务进程设置了3GB的cache用于映射磁盘空间,即0x10000000到0xD0000 2024-04-09 Blog > MIT6.828 #OS
MIT6.828-Lab5 IntroductionIn this lab, you will implement spawn, a library call that loads and runs on-disk executables. You will then flesh out your kernel and library operating system enough to run a shell on the 2024-03-25 Blog > MIT6.828 #OS
MIT6.828-Lab4-总结 Part A: 多处理器支持和协作多任务处理JOS支持symmetric multiprocessing(SMP)的多处理器模型,symmetric表示所有CPU拥有相同的的权限获取系统资源, SMP模型中的CPU按照启动顺序分为bootstrap processor和application processor,后者被前者启动。 LAPIC(本地高级可编程中断控制器)多核系统中,使用了LAPI 2024-03-24 Blog > MIT6.828 #OS
MIT6.828-Lab4 introductionIn this lab you will implement preemptive multitasking among multiple simultaneously active user-mode environments.In part A you will add multiprocessor support to JOS, implement round-rob 2024-03-10 Blog > MIT6.828 #OS
MIT6.828-Lab3-总结 Lab3的过程记录放在了我自己的博客上MIT6.828-Lab3,总结放在这里。 用户态环境的建立与管理以及异常处理机制用户环境JOS使用一个数组管理所有的环境(或称进程),最多有1024个struct Env,其使用链表记录所有free的env,并使用currenv来记录当前正在运行的环境。当前的物理内存布局如下: 接下来介绍一下JOS中第一个用户环境的创建流程:此处我觉得最妙的是在en 2024-03-09 Blog > MIT6.828 #OS
MIT6.828-Lab3 IntroductionIn this lab, we will implement the basic kernel facilities required to get a protected user-mode environment(AKA “process”), such as enhancing the JOS kernel to keep track of user environm 2024-03-03 Blog > MIT6.828 #OS
MIT6.828-Lab2-总结 JOS的物理内存分布如下(图来自于大佬博客) 分段机制JOS使用struct PageInfo来管理物理页,使用链表将空闲物理页一个个连接起来 123456789struct PageInfo { // Next page on the free list. struct PageInfo *pp_link; // pp_ref is the count of pointers (usu 2024-03-03 Blog > MIT6.828 #OS
MIT6.828-Lab1-总结 计算机启动步骤本lab主要告诉我们如何启动一台计算机,其启动流程分以下三步:1.BIOS 首先进行硬件自检(Power-On Self-Test),检查硬件能否满足运行的基本条件 根据启动顺序,读取优先级最高的存储设备,(启动顺序可以在BIOS界面中设置) 依次读取扇区(512字节),若最后两个字节为0x55和0xAA,则表明此扇区为引导扇区,随后将此扇区的512字节读入0x7c00处,此段程序 2024-02-27 Blog > MIT6.828 #OS
webServer-note 杂项 项目中为什么要处理SIGPIPE信号? ref Unix的五种IO模型? 阻塞IO 非阻塞IO,轮询什么时候可以读写(即什么时候数据从网卡抵达内核缓冲区),系统调用开销大 IO多路复用,为了使得一个线程可以同时处理多个请求 信号驱动式IO,内核会告诉程序什么时候可以读写 异步IO,内核会告诉程序什么时候读写好了 两种事件处理模式? Reactor模式:主线程只负责监听读写事件 2024-02-18 Blog > webServer #C++
MIT6.828-Lab2 IntroductionMemory management has two components, one is a physical memory allocator for the kernel, (which operate in units of 4KB, called pages), the other is virtual memory which maps the virtual a 2024-01-29 Blog > MIT6.828 #OS