Assignment 1

Due Wednesday, February 2, 2012 at the start of recitation

Introduction

Please answer the questions concisely.

Write neatly. If I have to struggle to figure out what you wrote, you will lose credit. Type your answers if your penmanship is poor.

In the "I shouldn't have to tell you this" department... Should you feel the need to use multiple pages, please fasten the sheets securely. Use a stapler or other permanent fastener. Avoid paper clips since sheets can slide out.

Reading/skimming

Papers

Questions

  1. (a) What is the purpose of interrupts?
    (b) What are the differences between a trap and interrupt?
    (c) Can traps be generated intentionally by a user program? If so, for what purpose?
  2. Read System Calls, SYSENTER Based System Call Mechanism in Linux 2.6, and Kernel command using Linux system calls.
    (a) What mechanism did Linux used to use for invoking system calls (creating the mode switch) on the x86 Intel architecture?
    (b) What mechanism is used to invoke system calls since the 2.6 kernel?
    (c) Why was the system call mechanism changed?
  3. Read/skim Codeguru's article on System Call Optimization with the SYSENTER Instruction on Microsoft's Windows platform. You may also want to skim a previous article that discussed Microsoft's earlier system call architecture (pre XP).
    Why is it important to switch stacks on a mode switch?
  4. (a) What is the main advantage of the microkernel approach to system design?
    (b) How do user programs and system services interact in a microkernel architecture?
  5. Read The UNIX Time-Sharing System. It's an almost 40 year-old paper that describes UNIX in its early days. Note the amount of memory that a full-featured UNIX installation required at that time.
    What are three advantages to treating devices as files within the file system?