lecture

Lecture 3: Processes and Threads

26 August, 2011

The lecture will start with a continuation of our unfinished discussion on C programming.

Then, we will delve deeper into process management and introduce the concepts of threads. After this lecture, students should be familiar with the concepts of processes, process control block, process table, context switching, process ID, process management system calls, and multi-threaded processes.

Having a hardcopy of slides during lecture would be helpful. Be prepare to take notes during lecture.

Download Slides: PDF

Download example code here.

Reading:

  • Section 2.1 (up to and include 2.1.6): Process
  • Section 2.2 (up to and include 2.2.2): Threads

Related Wikipedia entries are listed below. These are for students who are keen to go beyond what is covered in CS2106. Read the articles with a critical mind since Wikipedia is editable by anyone.

Here are related man pages: wait | exec | exit | fork

Lecture 2: Basic OS Concepts and Programming in C

19 August, 2011

In this lecture, we will first go through some basic concepts in an OS, including process, address space, file, and shell. We will then revisit how a system call is implemented in more detail. In the second half of the lecture, we will briefly introduce C programming, with an emphasis on pointers.

Download Slides: PDF

Having a hardcopy of slides during lecture would be helpful. Be prepare to take notes during lecture.

Reading:

  • Section 1.5: Concepts in OS.
  • Section 1.6: System calls (1.6.1 onwards are FYI at the moment — will visit them in details later in the semester).
  • Section 1.8: The world according to C.
  • Section 10.1, 10.2: Basic background on Linux (FYI)

Useful Materials on C for Java Programmers (from other universities)

Related Wikipedia entries are listed below. These are for students who are keen to go beyond what is covered in CS2106. Read the articles with a critical mind since Wikipedia is editable by anyone.

Lecture 1: Introduction

12 August, 2011

During this lecture, we will first go through some admin matters and answer the question: why should you learn OS? We will then briefly discuss what is an OS and its dual role as a programming interface and resource manager. Students will learn about the concepts of system calls, user mode/kernel mode, multi-programming, and time-sharing.

Download Slides: PDF

Reading:

  • Section 1.1: Introduces what is an OS.
  • Section 1.2, 1.3: History and Taxonomy of OS (FYI only).
  • Section 1.4: Review of CS2100 (good to read to refresh your memory).
  • Section 1.6 (till 1.6.1): How a system call is invoked — no details for now.

Related Wikipedia entries are listed below. These are for students who are keen to go beyond what is covered in CS2106. Read the articles with a critical mind since Wikipedia is editable by anyone.