
352 CHAPTER 6 Processes and Operating Systems
LAB EXERCISES
L6-1 Using your favor ite operating system, write code to spawn a process that
writes “Hello, world” to the screen or flashes an LED, depending on your
available output devices.
L6-2 Build a small serial por t device that lights LEDs based on the last character
written to the serial port. Create a process that will light LEDs based on
keyboard input.
L6-3 Write a driver for an I/O device.
L6-4 Write context switch code for your favorite CPU.
L6-5 Measure context switching overhead on an operating system.
L6-6 Using a CPU that runs an operating system that uses RMS, try to get the CPU
utilization ...