Posts

Showing posts with the label linux kernel concurrency

Linux system programming : linux kernel concurrency

The main difference of kernel threads with user space processes is concurrency ! user space programs run from the beginning to the end, without any need to worry about what else might be happening to. But for kernel drivers ,naturally, Linux systems run multiple processes, more than one of which can be trying to use your driver at the same time. Most devices are capable of interrupting the processor; interrupt handlers run asynchronously and can be invoked at the same time. Because of this Linux kernel code, including driver code, must be reentrant—it must be capable of running in more than one context at the same time.