Skip to content
Official PYQ · 1993

GATE CS 1993 Q6.8 — System Calls

Explain with AI

The details of an interrupt cycle are shown in figure.

Given that an interrupt input arrives every 11 msec, what is the percentage  of the  total time that the CPU devotes for the main program execution.

View worked solution

Answer: 90.00

From the standard interrupt cycle diagram for this question, the total time spent on handling a single interrupt is divided into three phases:

  • Save CPU status / Context save: 10 μs10\ \mu\text{s}
  • Interrupt Service Routine (ISR) execution: 80 μs80\ \mu\text{s}
  • Restore CPU status / Context restore: 10 μs10\ \mu\text{s}

Thus, the total time consumed per interrupt cycle is:

Tinterrupt=10 μs+80 μs+10 μs=100 μs=0.1 msT_{\text{interrupt}} = 10\ \mu\text{s} + 80\ \mu\text{s} + 10\ \mu\text{s} = 100\ \mu\text{s} = 0.1\text{ ms}

Given that an interrupt arrives every 1 ms1\text{ ms}:

  • Time spent on the main program in each 1 ms1\text{ ms} interval = 1 ms−0.1 ms=0.9 ms1\text{ ms} - 0.1\text{ ms} = 0.9\text{ ms}
  • Percentage of total time devoted to the main program = 0.9 ms1 ms×100%=90%\frac{0.9\text{ ms}}{1\text{ ms}} \times 100\% = 90\%

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore System Calls questions