1 / 19

For OS Experiments

For OS Experiments. What Do We Need?. A Computer &. What? You Have Only A Computer!. http://ben047.pixnet.net/blog/post/9988186-%E8%BD%89%E5%AF%84%E5%88%86%E4%BA%AB%EF%BC%9A-%E7%AA%AE%E7%9A%84%E5%AE%9A%E7%BE%A9. You Need Virtual Machines. How to Use ?. It’s Your Job.

minna
Download Presentation

For OS Experiments

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. For OS Experiments

  2. What Do We Need?

  3. A Computer&

  4. What?You Have Only A Computer! http://ben047.pixnet.net/blog/post/9988186-%E8%BD%89%E5%AF%84%E5%88%86%E4%BA%AB%EF%BC%9A-%E7%AA%AE%E7%9A%84%E5%AE%9A%E7%BE%A9

  5. You Need Virtual Machines

  6. How to Use ?

  7. It’s Your Job

  8. Virtual Machines Hypervisor

  9. Virtual Machines on Host OS

  10. Examples of VM • Oracle VM VirtualBox • VMWare Player • QEMU (Quick EMUlator)

  11. How to Build Drivers

  12. Commands to Download Tools • On Ubuntu12.04 • sudo apt-get update • sudo apt-get install make • sudo apt-get install build-essential • sudo apt-get install vim • sudo apt-get install linux-headers-$(uname -r)

  13. Makefile obj-m = hello.o KVERSION = $(shell uname -r) all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules clean: make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

  14. hello.c #include <linux/init.h> #include <linux/module.h> #include <linux/sched.h> MODULE_LICENSE("Dual BSD/GPL"); static int hello_init(void) { return 0; } static void hello_exit(void) { printk(KERN_ALERT "Goodbye, cruel world\n"); } module_init(hello_init); module_exit(hello_exit);

  15. Compile and Use It • make • sudo insmod hello.ko • sudo modprobe hello.ko try to also load other modules for undefined symbols • sudo rmmod hello • dmesg

  16. Requirements • Install a virtual machine on your computer • Install Linux and Windows 7 (or Windows XP) on the virtual machine • Implement a device driver • Print “Hi, I am Student-ID” to the kernel buffer when inserting the module • Print “Bye!” to the kernel buffer when removing the module • Hint: you can use the command dmesg to read the buffer

  17. Report • The steps for your implementation • The problem you met and how you solved it • The bonus you have done • The reference of this project • The report is limited within 4 pages

  18. Grading • Implementation • The VM: 20% • The OS: 20% (10% for each) • The driver: 20% • Report • 40% (the baseline is 30%) • Bonus • Recompile the Linux kernel on the VM: 10% • Implement a system call on the Linux kernel: 10%

  19. Submission • Project deadline: at 15:00 on 2014/01/17 NO DELAY! • Send your report and the compiled device driver (module) to TA:蔡宗佑 fatguy2991@gmail.com • The title of the email: OS Project of Student-ID • The title of the report: OS_Name_Student-ID • The title of the driver: Driver_Student-ID.ko • Point deduction for wrong format: 10% DEMO might be requested

More Related