Pregunta de entrevista de SAI Technology

System calls and interrupts and diff between soft irqs and tasklets vs workqueues

Respuesta de la entrevista

Anónimo

4 jul 2019

System calls are the method of which user-space programs request services from the kernel, like opening a file, creating a socket, writing to a file, etc. Interrupts are ways to invoke the kernel to do work. Interrupts are so freaking important, its not even funny. Interrupts tell the CPUs to run kernel code, to handle events, like from human interface devices, receiving packets over a network. Soft irqs and tasklets both constitute a bottom-half in an interrupt system. Soft irqs are different from tasklets in that tasklets can only run on one CPU at a time, while softirq routines can run on multiple CPUS. Workqueues allow worker threads to handle work that the kernel needs to do, so this might be where softirqs and tasklets put some of the work that needs to be done. Feel free to chime in or correct me though.