Assignment 1
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
- Week 1 lecture notes.
- Skim Chapter 1: pages 3-30 (Sections 1-9)
- Read the System call article in Wikipedia.
- Read the syscalls, Introduction to system calls Linux manual pages.
- Microkernels, Wikipedia article
Papers
- The UNIX Time-Sharing System, Dennis M. Ritchie and Ken Thompson, Bell Laboratories, 1974 (HTML version)
- Kernel command using Linux system calls, M. Tim Jones, IBM developerWorks Technical Library, 2010
- System Calls, The Linux kernel, Andries Brouwer, aeb@cwi.nl, 2003
- SYSENTER Based System Call Mechanism in Linux 2.6, Manu Garg
Questions
-
(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? -
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? -
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? -
(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?
-
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?