In our previous readings, we learned about the various classes of exceptions. While many of these are beyond the control of the programmer, they (and operating system) may send interrupts programmatically using Linux signals.
In this reading you’ll learn about how signals are handled and how a programmer can send signals. This will be useful in notifying other processes of certain events so that they may take a specific action.
Sections 8.5.0 - 8.5.4 (pp. 756-765) from the course textbook.
Each student will be responsible for learning and demonstrating proficiency in the following objectives PRIOR to the class meeting. The reading quiz will test these objectives.
The following objectives should be mastered by each student DURING and FOLLOWING the class session through active work and practice.
signal
and kill
functions.These exercises are geared towards mastering the BASIC learning objectives listed above. You are expected to submit them before class and it is highly recommended that you complete them before attempting the reading quiz.
For each of the following signals, describe (in your own words) their associated event.
How does the kernel keep track of which signals are pending in a given process?
How does the /bin/kill
program compare to the kill
system call?
In your own words, summarize what happens when a process receives a signal.