In this reading we will look at how exceptional behaviors are handled in a computer system. While there are many examples of exceptional behavior, we can classify them according to their cause, return behavior, and their synchronicity, allowing us to reduce the number of possible outcomes from an exception.
This reading will also introduce us to the concept of a process, an abstraction used to describe a program running on a computer system. It may seem odd to pair exceptions with processes, but processes couldn’t exist without exception handling mechanisms, thus their grouping.
Sections 8.0 - 8.2 (pp. 722-737) 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.
fork()
) and calling a regular function (e.g. printf
) are implemented in x86-64.The following objectives should be mastered by each student DURING and FOLLOWING the class session through active work and practice.
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.
Classify the following exceptions as an interrupt, trap, fault, or abort, or none (i.e. not an exception).
exit
function:open
function:How does the x86-64 syscall
instruction differ from the call
instruction?
If two programs that are running at the same time on your computer both write to address 0xFACEB007, will they interfere with each other? Explain why or why not.
Assume that you and your partner are working on an assignment that has two parts. If both of you were working at the same time, one doing the first part and one doing the second part, is this an example of concurrency, parallelism, or both? Explain.
Part A: What things are considered part of a process’ context?
Part B: What happens to the things you identified in Part A when a context switch occurs?