Interrupts and Syscalls

  • Mark Gondree Sonoma State University


This activity can be used relatively early in an operating systems class, as long as students are comfortable with the idea that an operating system is software (called a kernel) that runs in a privileged mode of operation (called kernel mode), and that its main job is to provide services to processes. Exploring how a process requests a service is the goal of this activity.

First, students are introduced to a hardware feature called an "interrupt." Students explore sources of interrupts (Model A), what happens after an interrupt is received by the CPU (Model B), and how software can produce an interrupt to request system services via a syscall (Models C and D). By the end of the activity, a student should be able to compare and contrast external and internal interrupts in terms of their causes and how they alter program execution, and be able to interpret the tables from syscall documents to analyze snippets of assembly from different architectures implementing Linux syscalls.

Level: Undergraduate
Setting: Classroom
Activity Type: Learning Cycle
Discipline: Computer Science
Course: Operating Systems
Keywords: interrupts, interrupt handlers, mode transfer, syscalls

Activities for Review