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

A. What is the benefit of Interrupt ? In other words, what CPU has to do if the

ID: 3553800 • Letter: A

Question





A. What is the benefit of Interrupt ? In other words, what CPU has to do if the Interrupt is not implemented?



B. What internal memory inside CPU is called? What is it for?



C. When you open multiple browsers and load multiple Internet pages at the same time, does your single core CPU really serve these tasks simultaneously (at the same time)? Describe what actually happens?



D. Explain the differences of Short Job Next (SJN) and Shortest Remaining Time Next (SRT) used for process scheduling algorithm. What might be the drawback of both algorithms?



Explanation / Answer


A.

The benefit of interrupt is that CPU time is saved from unrequired activities such as checking that any

new input is entered or not. CPU takes any action only when it is asked for. For example, if u enter a

pen drive into the computer, it sends an interrupt signal to the CPU and according to its priority, it is served.

Now, If interrupt is not implemented, it has to do POLLING. In Polling, CPU after a fixed interval of time,

goes through all the input devices, other internal hardware including memory scanning for requests which takes

significant CPU time.


B.

Internal memory inside CPU is called registers. It is used for storing data which is currently being processed.

Registers are used because they are fastest memory device.


C.

No, CPU actually doesn't serve these tasks simultaneously. These browsers, internet pages are assigned processes, threads and

with the help of Scheduling algorithms (generally round robin), they are served. Context switching is so fast that u feel that they are

served simultaneously.


D. SJN is non-preemptive algorithm whereas SRT is a preemptive algorithm which means that in SJN, the

processes in the queue is served on the basis of increasing cpu burst time at the start i.e initially they are sorted

in asscending order on the basis of burst time and are served in that order.

On the other hand, in SRT the processes can be preemmpted if there remaining burst time is lesser.. In other

words, at every moment the burst times of the processes are compared and the process with the least remaining time

is served.


Drawbacks:

SJN:

1) It has the potential for process starvation for processes which will require a long time to complete if short processes

are continually added.

2) The total execution time of a job must be known before execution

SRT:

It also has the potential for process starvation (but lesser than SJN); long processes may be held off

indefinitely if short processes are continually added.

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