SSE3044: Operating Systems (Spring 2019)

[Projects]

  • You will have several projects based on the xv6 instructional operating system. To successfully complete these projects, you must have excellent C programming skill and be familiar with the Linux platform.
  • Required skills
    • Fluent C programming (must!)
    • Basic knowledge on Intel x86 architecture
    • Intel x86 assembly programming
    • Basic knowledge on Unix/Linux systems
    • Ability to read a large, complex program

[Lab. Class]

  • Weekly lab session
    • 18:00~20:00 every Wednesday.
    • #400202

[Lab. Group]

  • 김건희,한치호(1) 김경민,이재국(2) 김낙현,배영빈(3) 김범석,최준오(4) 김영우,김효중(5) 박세진,송민찬(6) 송규한,박진용(7) 송유석,심정섭(8) 유민준,진승우(9) 이건휘,장효주(10) 이승태,이준태(11) 정진섭,최덕호(12) 최진우,한승하(13)
  • Weekly lab session
    • 18:00~20:00 every Wednesday.
    • #400202

[Lab. Oral test]

  • To be determined.

[Format for submission]

  • every project should be submitted with e-mail
  • email title format
    • project: [OS project-1 team 1] student1's ID & name, student2's ID & name
  • how to compress your project
    • make dist
    • make tar
    • then, tar.gz file will be generated automatically
    • rename to team0.tar.gz and upload in email
  • reports should be submitted in i-campus

Project #0 (Last update: 3/13(Wed.), 15:30PM)

  • Try to boot xv6 operating system
  • Show your student ID and name on boot message
  • Reading chap. 0, and chap. 1 of xv6-commentary will help your next projects

Project #1 (Last update: 3/25(Mon.), 15:00)

  • DUE: 4/2(TUE) 23:59:59
  • To set xv6's cpu number 2 to 1
    • Makefile -> CPUS := 1
  • example test case for self validation
    • test1_1 : getnice() / setnice() testcase
    • test1_2 : ps() / yield() syscall testcase
    • To use testcase, make it into a C file and modify Makefile to compile according testcase. After booting qemu, you can find your testcase execution file using ls command
      • ps user command should be checked by yourselves (just type ps in xv6)
  • Project#1 result announcement: project1_result

Project #2 (Last update: 4/10(Wed.), 19:00)

  • Testcase: testcfs
    • ps will be printed out twice
      • First for either parent or child process who has done its own job first. (runtime/weight should be same for parent & child)
      • Second for left process finishes its job. (if a child finishes earlier(has higher priority), the parent process will be only printed out)
  • How to handle vruntime, time slice in an integer?
    • Current Problems
      • Time slice will be divided proportionally with 1tick, which will be less than 1, meaning 0 in integer
      • Updating vruntime will occur in every 1tick, but if the weight of process is large, it will add only 0 as an integer
    • Solution
      • 1tick(10ms) is too coarse to divide, so treat it as 1000mtick
      • So timer interrupt will be occurred in every 1000mtick unit
      • Then, we can easily solve current problems
  • Project Announcement & Notifications
    • ps() system call
      • Total tick & runtime should be printed out in mtick unit
      • vruntime should be printed out
        • Number will be different from person to person, but its purpose is to see every process have similar vruntime
      • Allignment for runtime, runtime/weight, vruntime should be considered
    • Consider integer overflow only for the vruntime
      • Do not worry about the overflow of total tick or runtime
    • When a process is woken up, it gets (min_vruntime - vruntime(1tick)) to be the next scheduled process
    • When the process is forked it inherits parent process's 'vruntime'
  • IMPORTANT!
    • scheduling latency is 10tick(which was previously 1tick)
  • If you have any question about the project, ask in Piazza!
  • Oral test for project 2 will be discussed to fix schedule by team on this week's lab session(4/17 18:00)
  • Project#2 result announcement: project2_result
    • Questions about Project#2 result will be handled on 5/8 lab session

Project #3 (Last update: 5/7(Tue.), 16:00)

  • Testcase: mmap_test
    • This is just simple example of testcase. Students should modify own testcase to validate whether your code can handle every flows written in project3.pdf
  • Maximum length of mmap_area array is 64
    • If munmap is called and mmap_area has been deleted, according array point should be reusable
  • Parameters will be defined like follow (only PROT_READ&WRITE will be used in project, sorry for misinterpretation with other PROT flags)
    • PROT_READ 0x1
    • PROT_WRITE 0x2
    • PROT_EXEC 0x4
    • PROT_SEM 0x8
    • PROT_NONE 0x0
    • MAP_SHARED 0x01
    • MAP_PRIVATE 0x02
    • MAP_ANONYMOUS 0x04
    • MAP_POPULATE 0x08
    • MAP_FIXED 0x10
  • IMPORTANT!
    • When page table is modified, need to flush TLB: lcr3(V2P(pgdir))
    • Check address is unable to access after munmap
    • Since announce is late, the deadline of Project 3 is extended to 5/8(Wed) 23:59:59
      • team 3,4,9 who has already sent Project 3 should re-send after applying TLB flush
  • Oral test for project 3 will be discussed to fix schedule by team on this week's lab session(5/22 18:00)

Project #4 (Last update: 5/27(Mon.), 16:00)

  • template code : template_code
  • template code misses make dist & make tar: copy according parts of Makefile of previous projects for submit
  • How to test
    • Decrease PHYSTOP when kinit2 with the value over 4MB & use sbrk system call to allocate user virtual memory over memory size
    • sbrk syscall calls growproc() which eventually calls allocuvm().
    • So, by call sbrk(>4MB) will make to allocate more memory than freemem list size & occur swap out
    • By accessing to heap region swap in will also occur
  • Spread sheet for oral test scheduling : https://docs.google.com/spreadsheets/d/1lJ2Aa1Jq0Xir4Wo8Hl1Wu_g05lx6NdN279kfAL7X1Ys/edit?usp=sharing

Project #5 (Last update: 5/29(Wed.), 16:00)

  • Testcase: sizetest
    • Proper output should be 16523 sectors (will take few dozen seconds to minutes)
    • Make should number of CPU is set to 1
  • (6/12) About today's lab session
    • There will be no lab session for today
    • If you have any question about Project5, please ask in Piazza

Project&Report result

  • If you have any question about the result, contact TA with e-mail.