The design and construction of a user-level kernel for teaching multithreaded programming

Michael Bedy, Steve Carr, Xianglong Huang, Ching-Kuang Shene · 2003

Multithreading is a powerful programming paradigm that has become very popular. The authors have developed a set of course materials and software tools for effectively teaching multithreaded programming (MTP). One important component of the authors' system is a very simple user-level kernel for instructors to teach MTP without getting into system details, and for the students to add extensions. This paper presents the design and implementation of this kernel as well as its use in the classroom. This minimal user-level kernel employs a first-come-first-served scheduling policy, and permits a user to create and join threads, and use mutex locks. With this kernel, students are able to implement semaphores, barriers, reader-writer locks, mail-boxes and condition variables. This approach has two advantages: (1) students can easily learn the basics and internals of a kernel that supports MTP, and (2) conventional debuggers can be used for debugging purposes, because the kernel is a user-level program.

Read the paper · More papers on PaperTik