Reputation: 355
I assume that The time that takes the kernel to execute System call on behalf of a user process accounts as that process time(for the scheduler). Is it true to say that the time the processor spends executing an hardware interrupt handler is on account of the interrupted process too? If its true the interrupt handler steals time from the process?
Upvotes: 2
Views: 672
Reputation: 22487
Executing an hardware-interrupt handler would mean that the process is pre-empted.
However the pre-empted process is not suspended, it remains in the TASK_RUNNING state; it simply no longer uses the CPU (which will be busy executing the Interrupt Service Routine)
[1]
.
The time spent executing the ISR will count towards the interrupted process and hence the terminology that the ISR "steals" time from the process.
The following implementation of a simple kernel illustrates this in detail.
Upvotes: 4