Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following hypothetical scenario: 1. Process A makes a syscall sleep

ID: 3575339 • Letter: C

Question

Consider the following hypothetical scenario:

1. Process A makes a syscall sleep(5)
2. Process A is put to sleep
3. Process B starts executing
4. A timer exception occurs and triggers the appropriate X
5. Y is invoked
6. Y decides to resume the execution of process A
7. Context of Z is saved
8. Context of process A is restored and control is passed to it 9. Process A resumes execution

The correct values of X, Y and Z are:
(1) X = Scheduler, Y = Interrupt Handler and Z = Process B
(2) X = Kernel, Y = Interrupt Handler and Z = Process B
(3) X = Scheduler, Y = Interrupt Handler and Z = Process A
(4) X = Interrupt Handler, Y = Scheduler and Z = Process A
(5) X = Interrupt Handler, Y = Scheduler and Z = Process B

Explanation / Answer

(2) X = Kernel, Y= Interrupt Handler and Z = Process B

If an exception occurs the Kernel would invoke an interrupt handler by saving the context of the current porcess and restores the interrupted process, after it's completion the handler would give control to kernel

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote