Mit6.828/6.S081 fall 2019的Lab1是Unix utilities,主要内容为利用xv6的系统调用实现sleep.pingpong.primes.find和xargs等工具.本文对各程序的实现思路及xv6的系统调用流程进行详细介绍. 前言 在实验之前,推荐阅读一下官网LEC1中提供的资料.其中Introduction是对该课程的的概述,examples则是几个系统编程的样例,这两部分快速浏览一遍即可.对于xv6 book的第一章,则建议稍微细致地阅读一遍,特别是对fork…
目录 1. 简介 2. 安装ubuntu20.04 3. 更换源 3.1 更换/etc/apt/sources.list文件里的源 3.2 备份源列表 3.3 打开sources.list文件修改 3.4 刷新列表 4. 安装SSH 4.1 SecureCRT 报错 4.2 解决方法 4.3 修改ssh_config 4.4 修改sshd_config 4.5 重新启动服务并测试 5. 配置静态IP 6. 安装RISC-V交叉编译工具 7. 安装QEMU 8 测试 8. 1 下载xv6源码 8.…
BACKGROUND Many computer systems utilize virtualized memory for security, stability and/or other purposes. In various virtualized-memory systems, a virtual machine monitor ("VMM") may control direct use of memory and/or computer processors in a…
BACKGROUND Malicious code, known as malware, which includes viruses, worms, adware, etc., may attack core components of the operating system to compromise key applications, including critical applications that operate in the operating system kernel,…
A processor including a virtualization system of the processor with a memory virtualization support system to map a reference to guest-physical memory made by guest software executable on a virtual machine which in turn is executable on a host machin…
To translate a virtual address into a physical one, the CPU must take the contents of each level field, convert it into an offset into the physical page containing the Page Table and read the PFN of the next level of Page Table. This is repeated thre…
A. Restaurant Tables time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In a small restaurant there are a tables for one person and b tables for two persons. It it known that n groups of peopl…
逻辑地址与物理地址的转化 页表是由页表项(PTE)组成的数组.512个PTE构成一个页表页(Page-table page). PTE中包含了物理页码(PPN physical page number)以及一些标志,来控制物理空间块的读写访问权限. 物理地址与虚拟地址的映射为三层树形结构,每一层存储下一层页表页的地址,最后一层存储物理地址的PTE. (个人理解:计算机中的物理地址被逻辑性理解成了页面+偏移量,其本质没发生变化,依旧是某一内存单元的编号) ​ 图 PTE的格式 代码解析 walk函…
Lab4 Preemptive Multitasking(上) PartA : 多处理器支持和协作多任务 在实验的这部分中,我们首先拓展jos使其运行在多处理器系统上,然后实现jos内核一些系统功能调用以支持用户级环境去创建新环境.我们还需要实现协同式轮询调度(cooperative round-robin scheduling)算法,允许内核在旧的用户环境资源放弃CPU或者退出的时候切换到一个新的用户环境. 1. Multiprocessor Support 下面是一段对实验指导书的翻译. 我…
Lab 4: Preemptive Multitasking tags: mit-6.828, os 概述 本文是lab4的实验报告,主要围绕进程相关概念进行介绍.主要将四个知识点: 开启多处理器.现代处理器一般都是多核的,这样每个CPU能同时运行不同进程,实现并行.需要用锁解决多CPU的竞争. 实现进程调度算法. 实现写时拷贝fork(进程创建). 实现进程间通信. Part A: Multiprocessor Support and Cooperative Multitasking 该部分做…