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

Given the following set of events, show which routines the CPU is executing for

ID: 3695663 • Letter: G

Question

Given the following set of events, show which routines the CPU is executing for times 0 to 100 ns. Each handler routine (with its interrupt request) takes 20 ns to complete. The priority of the interrupts ranges from IRQ6 as the highest priority interrupt to IRQ0 as the lowest priority interrupt.

Time

Action

0 ns

Start of main program

10 ns

IRQ1

25 ns

IRQ4

30 ns

IRQ6

50 ns

IRQ3

   

Time        Action

0 ns:        Start of Main Program

10 s:        IRQ1

Time

Action

0 ns

Start of main program

10 ns

IRQ1

25 ns

IRQ4

30 ns

IRQ6

50 ns

IRQ3

Explanation / Answer

IRQ6 (A much higher priorty interrupt). So, this will take over the processor from IRQ4. This will continue for 20 ns, and it will be done by 50 ns.

Time Action 0 ns: Start of Main Program 10 ns: IRQ1 (The least priority interrupt) Actually, it should continue till 30 ns, as it requires 20 ns to complete. 25 ns: IRQ4 (A comparitively high priority interrupt). So, this will take over the low priority interrupt. This should continue till 45 ns, as it requires 20 ns to complete. 30 ns:

IRQ6 (A much higher priorty interrupt). So, this will take over the processor from IRQ4. This will continue for 20 ns, and it will be done by 50 ns.

50 ns: IRQ3 (A comparitively higher priority interrupt than the one in the queue.). So, instead of going back to IRQ4, now this handler wil lbe given control. This will continue for 20 ns, and it will be done by 70 ns. 70 ns: Now, the control goes back to IRQ4. It readily finished 5 ns of its work. So, it requires an additional 15 ns of time to complete. so, it will be done by 85 ns. 85 ns: Now, the least priority IRQ1 will get back its control, as its done with all its high priority IRQs. Its readily done with 15 ns of its work and it requires, only 5 more ns. So, it will be done by 90 ns. 90 ns: No Interrupts, so the processor will continue running the main program. 100 ns: Still in main(). If done. the processor will be idle.
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