xv6介绍

Xv6是由麻省理工学院(MIT)为操作系统工程的课程,开发的一个教学目的的操作系统。Xv6是在x86处理器上(x即指x86)用ANSI标准C重新实现的Unix第六版(Unix V6,通常直接被称为V6)。作为一门操作系统课程,我们采用了一个古老的而简单的操作系统进行教学。
展开查看详情

1.Advanced Operating Systems (CS 202) Presenter today: Khaled N. Khasawneh Instructor: Nael Abu-Ghazaleh Jan, 11, 2016

2. Today •  Introduction to xv6 2

3. v6 •  Sixth Edition Unix a.k.a. Version 6 Unix •  First public release of Unix out of Bell Labs –  By Ken Thompson & Dennis Ritchie, 1975 •  Designed for DEC PDP-11* •  Original source code still available: http://minnie.tuhs.org/cgi-bin/utree.pl 3

4. Why not using v6 •  PDP11 is not used nowadays •  Missing some of the key issues in modern Oses –  Paging –  Multicore •  Luckily .. 4

5. xv6 •  xv6 is an MIT reimplementation of Unix v6 –  Runs on x86 •  But we will run it on top of QEMU –  Smaller than v6 –  Preserve basic structure (Processes, files, pipes. etc.) –  Runs on multicores –  Got paging in 2011 J •  To understand it, you’ll need to reads it’s source code –  It’s not that hard –  Textbook/commentary: xv6: a simple, Unix-like teaching operating system •  Online: http://pdos.csail.mit.edu/6.828/2012/xv6/book-rev7.pdf 5

6. Why xv6? Why study an old OS instead of Linux, Solaris, or Windows? •  1: Big enough –  To illustrate basic OS design & implementation •  2: Small enough –  To be (relatively) easily understandable •  3: Similar enough –  To modern Oses –  Once you’ve explored xv6, you will find your way insde kernels such as Linux 6

7. XV6 Structure •  Monolithic kernel –  Provides services to running programs •  Processes uses system calls to access system services •  When a process call a system call –  Execution will enter the the kernel space –  Perform the service –  Return to the user space 7

8.XV6 system calls 8

9.XV6 system calls (2) 9