avatar
文章
93
标签
38
分类
18
首页
归档
标签
分类
LogoHuayiMIT 6.S081 Lecture 2: C and gdb 返回首页
搜索
首页
归档
标签
分类

MIT 6.S081 Lecture 2: C and gdb

发表于2023-03-28|更新于2023-04-11|操作系统
|总字数:10|阅读时长:1分钟|浏览量:

Reading

C

  • Intro to C

gdb

  • Using the GNU Debugger
COSRISC-VGNU Make
上一篇
MIT 6.S081 Lecture 3: OS organization and system calls
Reading Read Chapter2 read code Isolation 如果没有OS隔离,用户应用直接与硬件交互,难以实现Multiplexing Unix Interface 抽象关系 OS -> H/W process -> CPU exec -> Memory files -> disk block Defensive Isolation between apps and OS HW support user / kernel mode user mode被允许执行add sub等指令,而kernel mode被允许执行受限指令 virtual memory Virtual Memory Page table将虚拟地址映射到物理地址 每个独立的进程有独立的page table,因此实现了不同进程间的内存隔离 Kernel Kernel -> TCB(可信任的计算空间) 无bug 把apps当作恶意的 内核架构 宏内核(Linux) 微内核(两倍跳转,低performan...
下一篇
MIT 6.S081 Lecture 1: Introduction and examples
Reading Read Chapter1 OS purpose Abstract H/W Multiplex Isolation Sharing Security Performance Range of uses Classic design 内核 用户层隔离的设计 Why OS hard and interesting? unforgiving tension efficient - abstract powerfull - simple flexible - secure 文件交互和进程交互 program example using Sys Call example copy.c 使用read write exit系统调用 fd文件描述符(标准输入输出也只是文件而已) 0 stdin 1 stdout 2 stderr open.c 使用open write exit系统调用 sh.c shell可以被认为仅仅是执行标准输入的命令并打印到标准输出的用户程序 for...
相关推荐
2023-05-03
MIT 6.S081 Lab thread
Compulsory exercises Preparation reading To start the lab, switch to the thread branch: 123git fetchgit checkout threadmake clean Uthread: switching between threads (moderate) Using threads (moderate) Barrier(moderate) Optional challenge exercises The user-level thread package interacts badly with the operating system in several ways. For example, if one user-level thread blocks in a system call, another user-level thread won’t run, because the user-level threads scheduler doesn’t know th...
2023-04-28
MIT 6.S081 Lecture 17: Virtual memory for applications
Reading Read Virtual Memory Primitives for User Programs (1991)
2023-04-23
MIT 6.S081 Lab cow
Compulsory exercises Preparation To start the lab, switch to the cow branch: 123git fetchgit checkout cowmake clean OS真不是人写的把😭 Implement copy-on write(hard) 当xv6 fork一个子进程时,需要复制父进程的地址空间,这不仅占用了空间,也消耗了时间,你的任务是采用写时复制,fork()时child使用parent的内存空间,即子进程映射到父进程的物理空间上,当进程要写时,触发Page Fault 实现COW 修改uvmcopy()以在fork()时不分配新page,而映射到父进程 vm.c uvmcopy()1234567891011121314151617181920212223242526272829303132intuvmcopy(pagetable_t old, pagetable_t new, uint64 sz){ pte_t *pte; uint64 pa, i; uint fla...
2023-04-22
MIT 6.S081 Lecture 16: File system performance and fast crash recovery
Reading Read Journaling the Linux ext2fs Filesystem (1998) Information 第一节OS论文的阅读讲座 ext3 “log” = journal ext3 = ext2 + journal xv6 log review ext3 log ext3 log format ASYNC Batching Concurrency ext3 code steps in commit
2023-04-22
MIT 6.S081 Lecture 15: Crash recovery
Reading Read logging sections of “File system” read code Information 最后一节关于xv6的讲座了,后面的重点会放在操作系统论文的阅读上 再见了所有的xv6 😭 Problem crash如电源中断,系统重启等 crash会使得建立在磁盘上的文件系统进入不正确的的状态,怎样保证crash后维持正确的状态呢? 解决方案是logging Risk 文件系统的操作是多步的 如果crash后重启,很可能要么再次crash,要么读写了错误的数据 logging log的步骤 log writes commit op install clean log log能够保证文件系统操作的原子性,并提供快速恢复的能力,在不同步骤crash都有不同的恢复方案 log的内容 内存中有磁盘中log的cache Challenges eviction 不要驱逐正在log的block fs operation must fit log log限制了文件系统一...
2023-04-20
MIT 6.S081 Lecture 14: File systems
Reading Read Chapter8 read code File System User-friendly names/pathnames Share files between users/process Persistence/durability Why intersting? Abstraction is useful Crash safety Disk layout Performance -> Storage devices are slow -> to be fast storage -> buffercache device -> concurrency API example xv6文件系统提供的API实现了文件系统基本的用户级操作 FS structure inode含有文件的信息,代表一个独立的文件 inode的大小是64Bytes FS Layer 文件系统的多层结构抽象了硬件,并为软件提供了接口 Storage devices 这里需要...
avatar
Huayi
Time to Code.
文章
93
标签
38
分类
18
Follow Me
公告
🚧施工中...
目录
  1. 1. Reading
    1. 1.1. C
    2. 1.2. gdb
最新文章
AtCoder Beginner Contest 4192025-08-20
CSAPP bomblab2023-11-13
CSAPP datalab2023-11-11
Latex2023-11-08
Hackergame20232023-11-04
© 2022 - 2025 By Huayi框架 Hexo 6.1.0|主题 Butterfly 5.4.3
搜索
数据加载中