Lecture 1: Introduction

General information

Overview

Related courses:

C & systems programming

Why modern OSes are getting so big?

Role of OS, from an user's perspective (hint: think of little kids)

Buzzword: thin-provisioning (why we need virtual machines and/or containers?)

The abstraction: user and kernel modes

What must be done in the kernel? What can be done at user mode?

Figure: The Android architecture

Homework 1

A teaching operating system: xv6

A fully functional OS in 10k lines of code (mostly C, some x86 assembly).

The first homework

Get started today!

The main purposes:

Get familiar with the Linux command line environment and find yourself a handy text editor! (vim/emacs/sublime/nano/...)

We will have a brief tutorial for hw1 on Thursday.

Read the code and get started

x86-64 has everything in a flat directory:

Read the Makefile to see what's the kernel code (search "OBJS" and "kernel"), and what's the user code (search for "UPROGS")

What's difference between fs.img and xv6.img?

$ make qemu  # this will build everything needed and start a VM running an instance of the xv6-64 OS! Try it out with those provided commands "ls", "echo", etc..

The pop-up window looks useless. You can use $ make qemu-nox to run qemu without the graphic window. From the terminal, use "Ctrl+a, x" to exit emulation.