This is because the kernel design architecture wants it to be like this. Why so?
This is because interrupt context is not considered to be a process.So, it can't sleep.The interrupt code is doing some work on behalf of process and if slept then it will not only lead to the blocking of interrupt code but also the process that has called it .
This is because interrupt context is not considered to be a process.So, it can't sleep.The interrupt code is doing some work on behalf of process and if slept then it will not only lead to the blocking of interrupt code but also the process that has called it .
This comment has been removed by the author.
ReplyDeleteWhile the isr() is being executed the scheduler would be disabled, if isr() is sleeping, then nobody would be there to wakeup isr() and even the process.
DeleteBecause if Codes are running in interrupt context have no task_struct structure which is used by scheduler to access the process state while it sleeping.
ReplyDelete