1 / 26

CS444/544

II. CS444/544. Operating Systems II. Yeongjin Jang 04/02/19. Ring 3. Course Description. • Goal: Learn how modern operating systems work. • Lecture & Lab • Learn high-level fundamental concepts of OS in the lecture • Practice engineering details with Labs

carmeloc
Download Presentation

CS444/544

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. II CS444/544 Operating Systems II Yeongjin Jang 04/02/19

  2. Ring 3 Course Description • Goal: Learn how modern operating systems work • Lecture & Lab • Learn high-level fundamental concepts of OS in the lecture • Practice engineering details with Labs • You will build your operating system (JOS) • Lab sessions: TAs will help you OS Kernel (Ring 0) • Topics • Virtual memory, Segmentation, Paging • Process, Isolation, Kernel, User • Interrupt, Exceptions, Synchronization, Concurrency • Filesystem • etc. Image from: https://www3.nd.edu/~pbui/teaching/cse.30341.fa17/

  3. Course Objective • Understand how modern computer systems work • Be able to answer the following questions: • What happens when we turn on the computer? How does it boot? • How an OS runs an application? • How an OS runs application that requires memory more than its physical memory? • How multiple applications can run on the system? • How an OS enforces privilege separation? • How an OS protects itself from malicious software? • How multiple programs synchronize? How can we implement a lock? • How an OS stores a file? • How my keyclicks shown on the screen?

  4. Logistics • Website: https://os.unexploitable.systems • Instructor: Dr. Yeongjin Jang (yeongjin.jang@oregonstate.edu) • TAs: • Ping-Jui Liao • Hadi Rahal-Arabi • Kimia Tajik • Zixuan Feng • Gitlab: https://gitlab.unexploitable.systems • Piazza: https://piazza.com/class/jtumxajv58g7mv • Discord: https://discord.gg/yHn52Np • Assignment server: flip

  5. Course Structure • 10 weeks schedule • Virtualization (Week 1-4) • Concurrency (Week 5-8) • Persistence (Week 9-10) • Textbook • http://pages.cs.wisc.edu/~remzi/OSTEP/ • ~60 min lecture, ~10 min Q&A • 30~45 min tutorial in lab sessions • 35~50 min exercise in lab sessions

  6. Meeting Time (with me) • Lecture • Tu/Th 8:30am – 9:50am • Withycombe 109 • Office hour • Wed 5:00pm – 6:30pm (walk-in) • yeongjin.jang@oregonstate.edu • KEC 3079 • No class on 5/21 and 5/23, no office hour on 5/22 • Travel to a conference (IEEE S&P)… • Please work on labs assignments

  7. Lab Sessions (TAs) • Four sessions • Lab 1: TUE 10:00 – 11:20 (Handled by me) • Lab 2: TUE 12:00 – 13:20 (TAs: TBD) • Lab 3: WED 15:00 – 16:20 (TAs: TBD) • Lab 4: FRI 14:00 – 15:50 (TAs: TBD) • Will teach technical details of OS via labs • Tutorials • Q&A for lab exercises • TA Office Hours will be announced later.. • No lab sessions in the week of 5/20 • Majority of TAs also travels to the conference.. • Please work on lab assignments • We will be online

  8. Grading • 50% lab assignment • JOS Lab 1,2,3 and Concurrency Lab 1,2 • 20% Quizzes (mini exam during lab sessions) • Quiz dates will be announced at least a week before.. • 30% Final Exam • Exam date not determined yet, but will be in the final week. • Example grading scheme (we will have + / -) • A: 85% <= Score <= 100% • B: 70% <= Score < 85% • C: 60% <= Score < 70% • D: 50% <= Score < 60% • F: Score < 50%...

  9. The Lab (50%) • Five labs • JOS Lab 1: Booting a PC (2 weeks) • Bootloader, protected mode, etc. • JOS Lab 2: Memory Management (2 weeks) • Virtual memory, paging, etc. • JOS Lab 3: User Environment (2 weeks) • Process, user, kernel, system call, etc. • Concurrency Lab 1: Locks and Semaphores (1 week, TBA) • Implement synchronization mechanisms • Concurrency Lab 2: Deadlocks and Thread-safe issues (1 week, TBA) • Avoiding deadlocks, implementing thread-safe datastructures

  10. An Exercise Example in Lab 1

  11. The Lab Could be Difficult • Coding KERNEL code in C • Any memory error -> Triple fault… • Use GDB for debugging OS Kernel • Get familiar to tools ASAP.. Come to lab sessions and learn! • Assembly Languages • Intel x86 • Control hardware specific data • Page table • Global descriptor table (GDT) • Interrupt descriptor table (IDT)

  12. Lab Rules • DO NOT SHARE YOUR CODE WITH OTHER STUDENTS • You are encouraged to discuss with others about the assignments but do not ask/give the code to the others • Do not copy other students’ code or code available in online • Do not publish your code online • You will be asked to submit a simple write-up for the assignment • Describe how you solve each exercise/questions • Mention your collaborators in the write-up • Do not copy other students’ write-up • Do not publish your write-up online

  13. Lab Rules • You can have five (5) tokens • Each token let you push the deadline of a lab for 1 day • Plagiarism will be punished via the Office of Student Life.. • E.g., getting F or zero point for an entire week’s assignment • Please refer the Code of Student Conduct • https://studentlife.oregonstate.edu/studentconduct/academicmisconduct • https://studentlife.oregonstate.edu/sites/studentlife.oregonstate.edu/files/co de-of-student-conduct-102218.pdf

  14. Extra Credit Labs -- JOS Lab4 (15%) and 5 (15%) Due: 6/13, no Tokens! • JOS Lab is designed to teach students in semester systems (16 weeks) • Taught at MIT, Yale, Georgia Tech, etc. • Handling all labs within 10 weeks could be very tight… • But not impossible, some folks finish this within a month • Caffeinated 6.828 @ MIT • In addition to booting (Lab1), virtual memory (Lab2), and user environment (Lab3), JOS Lab is also available for: • Lab 4: Preemptive Multitasking • Time-sharing, Multi-thread, Multi-processor, concurrency, etc. • Lab 5: Filesystems • Files, spawns process, run applications via a shell! • Lab 6: Networking • Extra credits (due 6/13) for finishing Lab 4 / Lab 5 • 15% credits each

  15. NORMAL OPTION • 50% lab assignment • JOS Lab 1,2,3 and Concurrency Lab 1,2 • 20% Quizzes (mini exam during lab sessions) • 30% Final Exam

  16. A HARDCORE OPTION • 50% lab assignment • JOS Lab 1,2,3 and Concurrency Lab 1,2 • 20% Quizzes (mini exam during lab sessions) • 15% JOS Lab 4 • 15% JOS Lab 5 • Total: 100% • 30% Final Exam • Or you may take the final exam to fill missing credits from labs/quizzes

  17. CS 544 Students • 50% Lab assignments for CS 444 • 40% Lab assignments for CS 544 • Students will be asked to provide academic paper critiques • 2% each, five times (total 10%), and due in 1 week after posting date • Instructions will be posted later

  18. Tips to the Lab • Study in a group (do discussions!) • But please write the code individually! • Come to the class and lab sessions and follow tutorials/exercise! • Ask questions (Piazza, Discord, and Office Hour) • Understand your time budget (Debugging will take lots of your time!) • Plan ahead to finish the labs on time • Learn basic tools (e.g., C, gdb, assembly, editors, tmux, etc.) ASAP • This will help you earn more time on doing labs…

  19. What is an OS? Applications OS Hardware

  20. OS is a software layer that connects application and hardware • Abstraction • Different hardware speaks different language (protocols) • Intel CPU / AMD CPU / ARM CPU • NVIDIA GPU (GeForce) / AMD GPU (Radeon) • HDD, SSD, Floppy Disk, CD-ROM, DVD-ROM, etc. • Application runs without knowing such details • One source code, compile, then runs on Intel/AMD/ARM… • Open/read/write, send/recv • OpenGL, OpenCL, etc.

  21. OS Manages System Resources • Resource Management • Sharing • Multiple apps shares one CPU’s execution time • Apps sharing disk, network, graphics, etc. • Security • Privilege separation • Administrator vs regular user, among each users, etc. • Isolation • A process to another process…

  22. OSTEP: OS Three Easy Pieces • Virtualization • Concurrency • Persistence

  23. Virtualization Ring 3 • Virtualize Memory • Virtualize CPU • Virtualize Disk and other hardware OS Kernel (Ring 0) • Security

  24. Concurrency Ring 3 • Multi-threading • Run multiple apps at the same time • Symmetric Multi-processor Environment • Multi-cores! OS Kernel (Ring 0) • Concurrent hardware (resource) access!

  25. Persistence • How to store data? • How to manage permanent system state? • How to run a program from a disk?

  26. Q&A?

More Related