Characteristics of Interrupts and Wake-up Mechanisms in 6502 Assembly

1. Maskable Interrupts (IRQ) Can be enabled/disabled by setting the I bit in the status register Typically used for interrupt requests from external devices Automatically saves the PC and P registers to the stack upon response 2. Non-Maskable Interrupts (NMI) Cannot be disabled by software Usually used for emergencies (e.g., power failure) Has a higher … Read more

What Happens When a Deadlock Occurs in Linux Driver Code?

When writing a “dead loop” in the Linux kernel (<span><span>while(1);</span></span> or <span><span>for(;;);</span></span>), what happens depends on three key factors: On which CPU the code runs and at what priority (interrupt context or process context); Whether kernel preemption is enabled; Whether the CPU is responsible for maintaining system heartbeat (tick, RCU, scheduling clock, IPI, etc.). Let’s … Read more