This worksheet leads you through a set of exercises to learn about
interrupts and IO/Ports.
Step 1) Log into euclid
Step 2) Find out how long the machine has been up. Try the command uptime. Convert this number to seconds, and place the answer here ______________________. If it helps, there are 86,400 seconds in a day and 3,600 seconds in an hour and 60 seconds in a minute.
Step 3) Look at the pseudo-file /proc/interrupts. This is a file-like thing that gets regenerated every time you access it, and it describes the number and purpose of all the interrupts that have happened since the machine booted up. You can look at it with cat /proc/interrupts. How many timer interrupts have occured? ______________________________________
Step 4) Using the data from steps 2 and 3, at what rate do timer interrupts occur? How many per second? ___________________________________
Step 5) Type this command: cat /proc/interrupts; sleep 10; cat /proc/interrupts. It should get the interrupt figures, wait ten seconds, and get them again. How many timer interrupts occured in that ten seconds? _____________________
Step 6) Is this close to your prediction from step 4? _________________________________
Step 7) Looking at the interrupt numbers you just got. Did the number of keyboard interrupts increase? _______________________
Step 8) Is anyone typing at Euclid's keyboard right now? _________________________________
Step 9) You are typing commands into euclid. Do you want to change you answers to #7 and 8? __________________________
Step 10) Type the command /home/rappleto/pub/Classes/CS426/Notes/Interrupts/interrupt-command. This will tell you the number of packets and ethernet interrupts that have occured since the last reboot, wait five seconds, and then tell you the new numbers. The output is kind of confusing, so read carefully.
Step 11) How many packets were sent in that 5 seconds?___________________ How many recieved? __________________ How many total packets movements (send + recieve)? _______________ How many ethernet interrupts occured? _______________
Step 12) What causes an ethernet interrupt to occur?
Step 13) Again type cat /proc/interrupts. How many
non maskable interrupts have occured since the last reboot(they're labeled
"NMI")? ______________________________ What would
cause an NMI?
Step 14) The time-and-date clock is labeled "rtc". How many
interrupts have occured since the last reboot? ______________________________________
When did they occur?
Step 15) The hard drive is labeled "ata_piix". There are several such labels. On euclid,
which happens more, disk IO or network IO?