softirqs are bottom half interrupt processing, is based on a an index based function call mechanism where the function implement the functionality of softirq.
An array of function pointer is maintained. When a softirq is registered a valid function pointer is written into the appropriate index. The index represent the
number of the softirq, 0 being the highest priority softirq. A word is maintained as a mask for the pending softirq.
The number of softirqs currently 9 are represented by each bit of an word, when sofirqs are raised the appropriate bit in the mask are set.Next when kernel wants to run the pending softirqs it uses the masked word to identify the pending softirqs ,and appropriate function calls are invoked using the array, whose 0th index is mapped with the 0th bit of the mask word.
Tasklets are implemented over softirqs, index 0 and index 5 of the array contains pointers to functions which handles high and normal tasklets respectively. Tasklets are identified with a structure which contains a function pointer and a state flag among other members.
Whenever tasklets are created, a structure is created, populating the function pointer with the address of the function that implements the tasklet. A link list of all such structures are maintained.
When tasklet is scheduled, it(kernel) add a corresponding structure to the head of the link list and raise the softirq of the tasklets i.e. set the appropriate bits in the mask word.
Next when the function to handle the tasklets are invoked, it checked all elements of the link list, and invokes the function in the structure provided the state flag is not running, which indicates it already running in a processor.
Thus kernel make sure no 2 same tasklets are running in more than one processor.