Operating systems lab 1, simulating interrupt handling