EE488: Special Topics in Electronic Engineering
– Unix Kernel Design,
Fall 2020
Dept. of Electrical Engineering, KAIST

 

General Information

Time: Tue/Thu (09:00 – 10:15) with Zoom
Instructor: Youjip Won (ywon at kaist dot ac dot kr), https://oslab.kaist.ac.kr
Teaching Assistants: Joontaek Oh (na94jun at kaist dot ac dot kr), Dohyun Kim (ehgus421210 at kaist dot ac dot kr)
Office Hour & TA Hour: Tue 10:30 ~ 11:30 (N26-220 or with Zoom) / Thu 10:30 ~ 11:30 (N26-219 or with Zoom)
Course Homepage: https://oslab.kaist.ac.kr/ee488-fall-2020
Questions & Discussion: https://piazza.com/kaist.ac.kr/fall2020/ee488

 

Overview

In this class, we will learn the basics of how the computer operates and how the users can interact with the computer hardwares. System programming is the one which makes the applications to interact with the computer hardware and to get the job done. In this work, the students will learn how the program executes. The program is stored at the disk. It is loaded onto memory. Then, the instructions that form the program is executed one by one. When there are multiple programs, they may have to interact with each other in coordinated manner. When some of the data in memory is more important than the others, the program should be able to access the data with different criticality in a controlled manner. When a program is stored in the storage device, a program image follows a certain format so that it can be understood by an operating system. The students will learn the concepts and details with basic implementation of all above mentioned topics in this class. In this class, the lectures are based upon the educational but fully functioning operating system called xv6.

 

Course Materials

  • main materials: lecture notes
  • Supplement
    • Remzi Arpaci-Dusseau and Andrea Arpaci-Dusseau, “Operating Systems: Three easy pieces”, 2019
    • Maurice Bach, “The design of the Unix Operating System”, 1st edition, 1986
    • The C Programming Language, Brian W. Kernighan and Dennis Ritchie, 1988
    • Elliott I. Organick , The Multics System: An Examination of Its Structure, 1972
    • Allen B. Downey, “The Little Book of Semaphores“, Version 2.2.1, 2016
    • Reading materials  (link)

 

Schedule

Week 1 Introduction / XV6 Install (link) Lecture 01 (9/1), Lecture 02 (9/3) Homework 01 (Due on 9/14 PM 11:59)
Week 2 OS Organization Lecture 01 (9/8), Lecture 02 (9/10)
Week 3 System Initialization: Booting Lecture 01 (9/15), Lecture 02 (9/17) Homework 02 (Due on 9/28 PM 11:59)
Week 4 Address Space Design and Protection Mode Lecture 01 (9/22, 9/24) Homework 03 (Due on 10/05 PM 11:59)
Week 5 Trap & Interrupt
(10/1) No lecture (ThanksGiving day)
Lecture 01 (9/29)
Week 6 System Call Lecture 01 (10/6), Lecture 02 (10/8) Homework 04 (Due on 10/19 PM 11:59)
Week 7 Lock Lecture 01 (10/13)
Week 8 Midterm (2020. 10. 20. 9:00 ~ 10:30) Tuesday
(No lecture during midterm week)
Week 9 Function call convention Homework 05 (Due on 11/02 PM 11:59)
Week 10 Context Switch and Scheduling Homework 06 (Due on 11/16 PM 11:59)
Week 11 Buffer cache and Page Reclamation
Week 12 Crash Recovery and Logging Homework 07 (Due on 11/30 PM 11:59)
Week 13 File Abstraction in modern filesystem
Week 14 Directory organization and File descriptor Homework 08 (Due on 12/14 PM 11:59)
Week 15 Course Summary
Week 16 Final Exam (2020. 12. 16. 9:00 ~ 10:30) Tuesday
(No lecture during final week)

 

Prerequisite
C/C++, Data Structures

 

Grading
Midterm (20%), Final (20%), Homeworks (50%), quizes

 

Course Policy

  • All homeworks can be done either in the pairs and by yourself. You have to find your partner by yourself and finalized the team by the second week of the semester. If you form a team by yourself, there are 30% extra credit for the homework. You may change your mind and decide
    to do the homework by yourself. That is allowed. However, you cannot do the other way.
  • Plagiarism is not tolerated. If you are found to use part of other people’s code including the one that are publicly available on the web or on the internet, you will get ‘F’ regardless of the rest of your marks. If your code have the same design style with the others even though the code is not precisely identical, you will be questioned for the explanation and will get ‘F’ if there is any possibility that there is plagiarism.

 

Resources
Tool is essential components of Operating System development. You should make yourself familiarized with them. These tools have been around for a few decades. Still, they are one of the most popular tools preferred by the system software developers.

  • ctags (video) (ppt) : You have to navigate though hundreds of files looking for the definitions and declarations of various function. ctags is a classic tool to allow you to search through a number of files distributed over multiple directories.
  • cscope (video) (ppt) : cscope is similar to ctags but has more advanced feature. The cscope has reverse search. Sometimes, you want to search the functions that calls a given function, e.g. test(). You can perform this task with cscope.
  • gdb (video) (ppt), git, bash shell, qemu
  • PC assembly language (pdf)