In: Computer Science
Describe the items shared by all threads in a process. What are the items which are private to each thread.
On all current computers, at least part of the interrupt handlers are written in assembly language. Why?
ANS 1)
The items that are shared by all threads in a process are:-
Items that are private to each thread are:-
ANS 2)
When the interrupts start, they save the registers in the process table entry for the current ongoing process. The information pushed onto the stack by the interrupt is then removed and the stack pointer is then set to point at a temporary stack which is being used by the process handler. These actions like saving registers, setting the stack pointer can't be written/expressed in HLL such as C++,C, Java, so these are performed by assembly-language routine which is usually the same for all interrupts as the work of saving registers is identical.