Q1: When an interrupt of a system call transfers control to the operating system
ID: 3604471 • Letter: Q
Question
Q1: When an interrupt of a system call transfers control to the operating system, a kernel stack area separate from the stack of the interrupted process is generally used. Why?
Q2: A computer has 4 GB of RAM of which the operating system occupies 512 MB. The processes are all
256 MB and have the same characteristics. If the goal is 99% CPU utilization, what is the maximum I/O
wait that can be tolerated?
Q3: If a multithreaded process forms, a problem occurs if the child gets copies of all the parent’s threads. Suppose that one of the original threads was waiting for keyboard input. Now two threads are waiting for keyboard input, one in each process. Does this problem ever occur in single-threaded processes?
Q4: In Fig. 2-12 in the book, the register set is listed as a per-thread rather than a per-process item. Why? The machine has only one set of registers.
Q5: Consider the following piece of C code:
void main() { fork(); fork(); exit();
}
How many child processes are created upon execution of this program?
Explanation / Answer
Answering only the first question since we have multiple questions here.
1. The primary objective is to make sure that the kernel stack cannot be overwritten by any user process. Therefore the stack of the interrupted process is not used and rather the kernel stack area is used when an interrupt of a system call transfers control to the operating system.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.