Is spinlock required for every interrupt handler?
In Chapter 5 of ULK the author states as follows:
"...each interrupt handler is serialized with respect to itself-that is,
it cannot execute more than one concurrently. Thus, accessing the data
struct does not require synchronization primitives"
I don't quite understand why interrupt handlers is "serialized" on modern
CPUs with multiple cores. I'm thinking it could be possible that a same
ISR can be run on different cores simultaneously, right? If that's the
case, if you don't use spinlock to protect your data it can come to a race
condition.
So my question is, on a modern system with multi-cpus, for every interrupt
handler you are going to write that will read & write some data, is
spinlock always needed?
No comments:
Post a Comment