COMS W4118 Spring 2008: Homework Assignment 2

Last Updated Feb 25th 2008

Due Thursday, February 28th at 9:10 AM (beginning of class)

This homework consists of two components: written assignment and programming assignment.  Each is to be submitted via Courseworks.

The written components of the assignment is to be done alone, not in teams.  Discussion is encouraged but collaboration is not allowed.

The programming assignment is to be done in assigned groups.  If you do not know what team you are on contact the professor.

Written Assignment

Exercise numbers refer to the course textbook, Operating System Concepts with Java. Each problem is worth 5 points.
  1. Exercise 3.2
  2. Exercise 3.4
  3. Exercise 4.3
  4. Exercise 4.4
  5. Exercise 4.9
  6. When an interrupt or system call transfers control to the operating system, a separate kernel stack is used instead of the process stack.  Why?
  7. CANCELLED IPC mechanisms fall into two categories: message passing and shared memory.  What are the advantages and disadvantages of each?
  8. What is the advantage of user threads over kernel threads? Kernel threads over user threads?
  9. Assume a user-level threads package without premption.  Why would a thread every voluntarily give up the CPU by calling thread_yield()?  For all it knows, it may never get the CPU back.
You should submit your assignment via Courseworks->Class Files->Shared Files->HW2_Written_Assignment. Upload your answers in a single ASCII text file.  The filename should be HW1.<uni>.txt  For example, if your uni is sa3152, your submission filename should be HW1.sa3152.txt

Programming Assignment: Adding a System Call to Linux

Programming problems are to be done in your assigned groups using one of the VMs that has been assigned to your group members. For all programming problems you will be required to submit source code, a README file documenting your files and code, and a test run of your programs. In addition, you should submit a cover sheet using either homework_work.txt or homework_nonwork.txt, depending on whether or not the programming assignment is completely working or not. For source code submissions, you only need to submit new source code files that you created and kernel source code files that you changed. You should clearly indicate your names, email addresses, and assigned group number on your submission. Each group is required to submit one writeup for the programming assignment.

You will build your own Linux kernel for this class. For each homework assignment, you will build a new Linux kernel. The image of the kernel you build for this assignment should be vmlinuz.hmwk2. Grading for this assignment will be done based on vmlinuz.hmwk2.

Description

As we've seen, system calls are the primary interface for applications requesting kernel services.  In this assignment, you'll see how to extend the operating system by adding a system call.

Purpose

Before you start

Note that for this and subsequent kernel programming assignments, you will be using a VMware VM to test and debug your kernels. To use VMware, you need an MRL account . If you setup this account for the first time, or reset your password, you must then change your password in the MRL lab at least once. You need to request a VM allocation by email as documented in the VMware section of the class resources web page.

Programming Assignment

Special Notes - Clarifications

Requirements

References