Interview Questions

LDD - Interrupt Handling

Linux Device Driver - Interview Questions

LDD - Interrupt Handling

Interrupt Handling in Linux Interview Questions

  • Explain about the interrupt mechanims in linux?
  • What are the APIs that are used to register an interrupt handler?
  • How do you register an interrupt handler on a shared IRQ line?
  • Explain about the flags that are passed to request_irq().
  • Explain about the internals of Interrupt handling in case of Linux running on ARM.
  • What are the precautions to be taken while writing an interrupt handler?
  • Explain interrupt sequence in detail starting from ARM to registered interrupt handler.
  • What is bottom half and top half.
  • What is request_threaded_irq()
  • If same interrupts occurs in two cpu how are they handled?
  • How to synchronize data between 'two interrupts' and 'interrupts and process'.
  • How are nested interrupts handled?
  • How is task context saved during interrupt?
  • What is bottom halves and Top half.? Whats their functionality?
  • What are upper half and bottom half in device drivers.Why are they used?
  • What is the difference between ISR and interrupt handler.(Both are the same)
  • What is an ISR? What are the basic operations there?
  • How would you handle sleeping or blocking instructions in an Interrupt Service Routine(if unavoidable) or basically if the length of ISR is long?
  • Can u have reentrant code inside interrupt handler. (NO)
  • Cache coherency.- MESI /MSI protocol
  • What does a interrupt handler take in as input... and what does it return.( it does not accept or return anything)
  • What is the disadvantage of dynamic device number assignment ?
  • Data sharing between ISR and threads?
  • How interrupts are generated?
  • How to Enabling & Disabling of interrupts
  • softirq vs tasklet vs workqueue
  • How are interrupts handled in linux
  • Top and bottom halves. Examples
  • what is an interrupt and difference between exceptions and signals
  • When a signal is raised on a interrupt line what will be passed to processor either interrupt number or anything else?
  • How kernel comes to know which device raised an interrupt when interrupt is shared.
  • What all the things to be taken care while handling an interrupt?
  • Main difference between Tasklets and workqs?
  • When an interrupt can be disabled? When an interrupt can be enabled again?( Not asked but better to find the answer
  • How a interrupt is registered?
  • how you select the bottom half mechanism and what are the differences between them
  • what in interrupt context and process context
  • Interrupt based driver.
  • How a interrupt will be handled in Linux.
  • Explain about shared interrupt and how an corresponding interrupt Handler is called while an interrupt is shared?
  • What is software interrupt and hardware interrupt with examples?
  • explain how an interrupt of hardware device is handled
  • Interrupt handler ? how interrupt is serviced?
  • How to register an interrupt handler?
  • How to know whether a interrupt is an edge triggered or level triggered from registering an interrupt handler?
  • what is softirq and tasklet and work queues?
  • what are kernel synchronization techniques
  • In detail about top half and bottom Half?
  • In which interrupt context the interrupt will run?
  • spin_lock_bh() diff spin_lock_irq()?
  • ISR descriptor Table
  • Top half and bottom half interrupt approach?
  • Tell about interrupts handling in kernel?
  • When a interrupt is handled whether that specific interrupt is disabled or not? If disabled why ? if not disabled why not disabled?
  • When a interrupt is handled tell whether all interrupts are disabled or not ?if yes why ?if no why?
  • As device driver developer when you will you disable or enable particular interrupt or all interrupts What is the functionality of save_interrupts?
  • what is the first function called when interrupt is handled?
  • Have you heard about “Handle_interrupt” ?
  • what are the methods or functions to raise execute the interrupt process when interrupt occurs.
  • What is the difference between IRQ & FIQ.
  • how the synchronisation works in single processor system(spinlock_irq_save).
  • Do_irq?
  • How a delayed execution in interrupt is handled?
  • A global data member is programmed to get modified in a thread and Interrupt, so what kind of synchronization mechanism will you use?
  • Can interrupts sleep?why?
  • Types of interrupts?
  • What actually happens while interrupt occurs exactly explain in terms of context switching ,what happens to the current running process?
  • As their no code written to do context saving when a interrupt happens in any of the functions then which is responsible in doing this context saving and switching context?
  • Interrupts, Bottom half.
  • How buffer is copied to user level
  • Explain working of interrupts
  • Function Signature of registering Interrupt handler? and Flags used while requesting IRQ?
  • How Intrrupts are executed?.
  • What are software interrupts? What are hardware interrupts? Can you mention the names and explain?
  • What are different caches [L1 and L2 cache]?
  • What is the role of interrupts in a device driver ? How are interrupts handled in device driver ?
  • How will you make interrupt handlers as fast as possible ?
  • What are the types of softirqs ?
  • Difference between Timer Softirq and Tasklet Softirq ?
  • What are tasklets ? How are they activated ? when and How are they initialized ?


If you have any queries please email us at info@motionzen.com