The present disclosure provides a method, apparatus,
system, device, and medium for
distributed management of the upper half of interrupts. Among them, a processor runs a
peripheral driver and a kernel thread for the
lower half of interrupts; the
peripheral driver allocates a memory area that can be directly read and written to the interrupt controller, assigns an
interrupt flag to an external device, registers a
processing function for the
lower half of interrupts, and establishes a mapping relationship between the
processing function for the
lower half of interrupts and the
interrupt flag. The interrupt controller receives an interrupt message sent by an external device, extracts the
interrupt flag, and writes the interrupt flag and the position of a new cache
tail pointer into a cache entry; the kernel thread for the lower half of interrupts determines whether there is an interrupt based on the position of the cache
tail pointer and the position of the cache head pointer in the cache entry; in the case of an existing interrupt, queries the mapping relationship between the
processing function for the lower half of interrupts and the interrupt flag based on the interrupt flag, determines the target processing function for the lower half of interrupts, and uses the target processing function for the lower half of interrupts to
handle the interrupt.