《操作系统》的实验代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
4.5 KiB

пре 6 година
пре 12 година
пре 12 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 6 година
пре 11 година
пре 9 година
пре 11 година
пре 6 година
пре 11 година
пре 12 година
пре 12 година
пре 11 година
пре 9 година
пре 6 година
пре 11 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 12 година
пре 12 година
пре 12 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 10 година
пре 6 година
пре 10 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 10 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 12 година
пре 6 година
пре 12 година
пре 6 година
  1. INTRODUCTION
  2. ============
  3. ucore labs was used as OS Experiments in OS Course Of Dept. of Computer Science & Technology, Tsinghua University.
  4. ucore is a teaching OS which is derived from xv6&jos in MIT, OS161 in Harvard and Linux.
  5. ucore was developed and used in Department of Computer Science & Technology, Institute for Interdisciplinary Information Sciences, Tsinghua University.
  6. The codes in the files that constitute xv6&jos are Copyright (2006-Current) Frans Kaashoek, Robert Morris, and Russ Cox and uses MIT License.
  7. The codes in the files that constitute OS/161 are written by David A. Holland.
  8. The codes in the files that constitute ucore are Copyright (2010-Current) Yu Chen, Naizheng Wang, Yong Xiang and uses GPL License.
  9. The documents in the files that constitute ucore are Copyright (2010-Current) Yu Chen, Yong Xiang and uses Creative Commons Attribution/Share-Alike (CC-BY-SA) License.
  10. MAINTAINERS
  11. ========
  12. OS course for Dept. CS. in Tsinghua Univ., and MOOC OS course
  13. -----------------------------------
  14. - Chen, Yu: http://soft.cs.tsinghua.edu.cn/~chen
  15. - Mao, Junjie: eternal.n08@gmail.com
  16. - Zhang, Wei: zhangwei15@mails.tsinghua.edu.cn
  17. CONTENTS
  18. ========
  19. labs info
  20. ----------------
  21. ```
  22. lab0: preparing
  23. lab1: boot/protect mode/stack/interrupt
  24. lab2: physical memory management
  25. lab3: virtual memory management
  26. lab4: kernel thread management
  27. lab5: user process management
  28. lab6: scheduling
  29. lab7: mutex/sync
  30. lab8: filesystem
  31. ```
  32. WORK IN MS WINDOWS
  33. ==================
  34. ```
  35. Working in Linux is encouraged. But If you like to work in MS Windows, we provide virtual machine environment (Runnint Ubuntu in VirtualBox) in
  36. Windows to help you to finish the labs. If you don't want to install ubuntu and other softs to finish these labs in Windows, you can use
  37. VirtualBox soft (https://www.virtualbox.org/) and a virtual disk image with all these softs. Below example is shown how to setup lab environment in Windows.
  38. You can download this virtual disk image -- oslabs_for_student_2012.zip (576.2MB,) from http://pan.baidu.com/share/link?shareid=69868&uk=2585194235, which
  39. is an VirtualBox disk image (contains ubuntu 12.04 and needed softs, and is zipped with zip and xz format), and can be unzipped
  40. by haozip software (http://www.haozip.com).
  41. After unzip oslabs_for_student_XXX.zip, you will get
  42. ---
  43. C:\vms\ubuntu-14.04.vbox.xz
  44. C:\vms\ubuntu-14.04.vmdk.vmdk.xz
  45. C:\vms\ubuntu-14.04.vmdk-flat.vmdk.xz
  46. ---
  47. then you will continue unzip all these files, and get
  48. ---
  49. C:\vms\ubuntu-14.04.vbox
  50. C:\vms\ubuntu-14.04.vmdk.vmdk
  51. C:\vms\ubuntu-14.04.vmdk-flat.vmdk
  52. ---
  53. If you installed VirtualBox soft, then the last step is: double clik file "ubuntu-12.04.vbox" and run ubuntu 12.04 in VirtualBox.
  54. In ubuntu 12.04 login Interface:
  55. username: chy
  56. password: <SPACE KEY>
  57. After you login, you will see the directory ucore_lab in HOME directory.
  58. ```
  59. TESTED ENVIRONMENT
  60. ==================
  61. ```
  62. UBUNTU 14.04+: GCC-4.8.2+ CLANG-3.5+
  63. FEDORA 20+: GCC-4.8.2+
  64. ```
  65. EXERCISE STEPS
  66. ==============
  67. ```
  68. 0 Get the newest os lab src codes/docs.(Insure you can connect to github in ubuntu running on VrtualBox)
  69. 0.1 If you try to get all codes
  70. $rm -rf ucore_lab
  71. $git clone git://github.com/chyyuu/ucore_os_lab.git
  72. $cd ucore_lab
  73. 0.2 If you gloned ucore_lab and only try to get the updated codes
  74. $cd ucore_os_lab
  75. $git pull
  76. 1 $cd labX
  77. 2 read codes (specially the modified or added files)
  78. 3 add your code
  79. 4 compile your code
  80. $make
  81. 5 check your code
  82. $make qemu
  83. OR
  84. $make grade
  85. 6 debug your code
  86. $make debug
  87. 7 handin your code
  88. $make handin
  89. ```
  90. OPTION
  91. ==============
  92. Now, ucore suuport LLVM/Clang-3.5 +
  93. in step4:
  94. $ USELLVM=1 make
  95. then you will use clang to compile ucore
  96. GRADE/RANK
  97. ==========
  98. ```
  99. Superman: Finish all OS labs in one month by yourself
  100. Master: Finish all OS labs in two month by yourself
  101. Veteran: Finish all OS labs in three month by yourself
  102. Apprentice: Finish all OS labs in one semester with other guy's help
  103. ```
  104. RESOURCE REPOSITORY
  105. ===================
  106. ```
  107. Basic OS labs (for students who learn OS course)
  108. The newest lab codes and docs is in https://github.com/chyyuu/ucore_os_lab
  109. Advanced OS labs (for OS geeks or hackers or guys with Superman/Master Rank)
  110. The newest lab codes and docs is in https://github.com/chyyuu/ucore_plus
  111. ```
  112. UCORERS (Contributors)
  113. ======================
  114. Junjie Mao, Yuheng Chen, Cong Liu, Yang Yang, Zhun Qu, Shengwei Ren, Wenlei Zhu, Cao Zhang, Tong Sen, Xu Chen,
  115. Cang Nan, Yujian Fang, Wentao Han, Kaichen Zhang, Xiaolin Guo, Tianfan Xue, Gang Hu, Cao Liu, Yu Su,Xinhao Yuan, Wei Zhang, Kaixiang Lei...