CS 444544 Operating Systems II Introduction to OS

  • Slides: 18
Download presentation
CS 444/544 Operating Systems II Introduction to OS 03/31/20 1

CS 444/544 Operating Systems II Introduction to OS 03/31/20 1

Instructor: Yeongjin Jang • Worked at OSU Since Oct 2017 • Main research area:

Instructor: Yeongjin Jang • Worked at OSU Since Oct 2017 • Main research area: systems security • Hacking • CPU side-channel attacks, Jailbreaking, exploit development, automatic hacking (fuzzing / symbolic execution), automatic bug finding, designing secure systems, etc. . • Faculty advisor of OSUSEC • CS 419/579 Cyber Attacks and Defense • CS 419/579 Systems Security • Feel free to reach me if you are interested in cybersecurity… 2

Ring 3 Course Description • Goal: Learn how modern operating systems work • Lecture

Ring 3 Course Description • Goal: Learn how modern operating systems work • Lecture Lab 0) OS Kernel&(Ring • • 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 • Topics • • • Virtual memory, Segmentation, Paging Process, Isolation, Kernel, User Interrupt, Exceptions, Synchronization, Concurrency Filesystem etc. 3 Image from: https: //www 3. nd. edu/~pbui/teaching/cse. 30341. fa 17/

Course Objective • Understand how modern computer systems work • Be able to answer

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 each other? How can we implement a lock? How an OS stores a file? How my keyclicks shown on the screen? 4

Administrivia • Website: https: //os. unexploitable. systems • Instructor: Dr. Yeongjin Jang (yeongjin. jang@oregonstate.

Administrivia • Website: https: //os. unexploitable. systems • Instructor: Dr. Yeongjin Jang (yeongjin. jang@oregonstate. edu) • TAs: • • • Hadi Rahal-Arabi Ping-Jui Liao Jinhong Choi Zander Work Andrew Quach Gitlab: https: //gitlab. unexploitable. systems Piazza: https: //piazza. com/class/k 87 ycsmy 7 p 8263 Discord: https: //discord. gg/h. Py. Pa. Qf Assignment server: os 2. engr. oregonstate. edu, os 1, oldos 2 5

Course Structure • 10 weeks schedule • Virtualization (Week 1 -4) • Concurrency (Week

Course Structure • 10 weeks schedule • Virtualization (Week 1 -4) • Concurrency (Week 5 -8) • Persistency (Week 9 -10) • Textbook • http: //pages. cs. wisc. edu/~remzi/OSTEP/ • • Read: prep materials posted on homepage Watch: 50 min VIDEO lecture Study: study JOS labs (tutorial videos / lab instructions website) Engage: ~30 min ZOOM Q&A and office hours on Discord 6

Meeting Time (with me) • Lecture (Video, asynchronous) • Released at Tu/Th 8: 30

Meeting Time (with me) • Lecture (Video, asynchronous) • Released at Tu/Th 8: 30 am (Video, link will be available on Canvas/Homepage) • Lecture Q&A (via Zoom, not required) • Tu/Th 9: 20 am ~ 9: 50 am (https: //oregonstate. zoom. us/j/593239737) • Office hour (via Zoom) • Wed 5: 00 pm – 6: 30 pm (https: //oregonstate. zoom. us/j/916047903) 7

Lab Sessions (TAs) • Will teach technical details of OS via labs • Tutorials

Lab Sessions (TAs) • Will teach technical details of OS via labs • Tutorials (Video, released before Tu 10: 00 am) • Q&A for lab exercises • Five Lab Q&A sessions (via Discord) • • • Lab 1: TUE 10: 00 – 11: 20 (Hadi, Zander) Lab 2: TUE 12: 00 – 13: 20 (Hadi, Andrew) Lab 3: WED 15: 00 – 16: 20 (Ping-Jui, Jinhong) Lab 4: THU 10: 00 – 11: 20 (Ping-Jui, Jinhong) Lab 5: FRI 14: 00 – 15: 50 (Zander and Andrew) 8

Office Hours, etc. 9

Office Hours, etc. 9

Grading • 70% JOS lab assignment • Lab 1 (10%), Lab 2 (15%), Lab

Grading • 70% JOS lab assignment • Lab 1 (10%), Lab 2 (15%), Lab 3 (20%), Lab 4 (25%) • 30% Quizzes (mini-exam) • Quiz 1 (4/21) : Virtual Memory • Quiz 2 (5/7): System calls, faults, and exceptions • Quiz 3 (5/28): Concurrency 10

The Lab (70%) • Four labs • JOS Lab 1 (10%): Booting a PC

The Lab (70%) • Four labs • JOS Lab 1 (10%): Booting a PC (2 weeks) • Bootloader, protected mode, etc. • JOS Lab 2 (15%): Memory Management (2 weeks) • Virtual memory, paging, etc. • JOS Lab 3 (20%): User Environment (2 weeks) • Process, user, kernel, system call, etc. • JOS Lab 4 (25%): Preemptive Multitasking (3 weeks) • Implementing context switching, inter-process communication, etc. 11

An Exercise Example in Lab 1 12

An Exercise Example in Lab 1 12

The Lab Could be Difficult • Coding KERNEL code in C • Any memory

The Lab Could be Difficult • Coding KERNEL code in C • Any memory error -> Triple fault… • Use GDB for debugging OS Kernel Watch both lectures and lab tutorial • Assembly Languages videos on time and ask TAs for help! • Intel x 86 • Get familiar to tools ASAP. . • Control hardware specific data • Page table • Global descriptor table (GDT) • Interrupt descriptor table (IDT) 13

Lab Rules • DO NOT SHARE YOUR CODE WITH OTHER STUDENTS • You are

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 14

Lab Rules • You can have five (5) tokens • Each token let you

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/e dited_code_of_student_conduct. pdf 15

CS 544 Students • Will have higher grade bar than CS 444 (+3 pts)

CS 544 Students • Will have higher grade bar than CS 444 (+3 pts) • E. g. , A is for 93 and over for CS 444, and 96 and over for CS 544 16

Tips to the Lab • Study in a group (do discussions!) • But please

Tips to the Lab • Study in a group (do discussions!) • But please write the code individually! • Follow tutorial video • 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… 17

Notices • There will be lecture Q&A from 9: 20 am to 9: 50

Notices • There will be lecture Q&A from 9: 20 am to 9: 50 am on every Tuesday and Thursday • https: //oregonstate. zoom. us/j/593239737 • My (virtual) office hour is Wed 5: 00 pm ~ 6: 30 pm • https: //oregonstate. zoom. us/j/916047903 18