Interview Questions

LDD - Modules

Linux Device Driver - Interview Questions

LDD - Linux Modules

Linux Modules Interview Questions
  • To deploy a module inside kernel, what are the possible methods.? Mention actual difference among them.
  • Explain about about ksets, kobjects and ktypes. How are they related?
  • As kernel can access user space memory, why should copy_from_user is needed?
  • how many ways we can assign a major minor number to any device?
  • User application will block on IOCTL, in kernel untill interrupt arrives this IOCTL will be blocked. When interrupt comes IOCTL should retun. Desing this mechanism.
  • What is IOCTL, how it is used in user and kernel driver code ?
  • What is difference between sleep_on ( ) and interruptible_sleep_on ( ) APIs in linux kernel ?
  • When should should use which one, how it should be decided ?
  • How to make a module as loadable module?
  • How to make a module as in-built module?
  • Explain about Kconfig build system?
  • Explain about the init call mechanism.
  • What is the difference between early init and late init?
  • Early init functions are called when only the boot processor is online.
  • Run before initializing SMP.
  • Only for built-in code, not modules.
  • Late init functions are called _after_ all the CPUs are online.
  • How are the atomic functions implemented in case of ARM architecture?
  • How is container_of( ) macro implemented?
  • Explain about system call flow in case of ARM Linux.
  • What 's the use of __init and __exit macros?
  • How to ensure that init function of a partiuclar driver was called before our driver's init function is called (assume that both these drivers are built into the kenrel image)?
  • Main Advantages and disadvantages of having separate user space and kernel space?
  • what is user space and kernel space?
  • What is re entrant function
  • what is module
  • What is a device driver and write a simple driver and explain what happens when an insmod is done an module.?
  • How will you insert a module statically in to linux kernel
  • how the device files are created in Linux
  • How can a static driver runs? Without doing any insmod?
  • What are Callback functions?
  • what kind of information the Linux driver modules (.ko )files has ?
  • what are the different ways the Linux can switch from User Space to Kernel Space & vice-versa?
  • How User space buffer can be accessed from kernel level and vice versa?
  • How "Make" is performed in compiling a module?
  • What is the path of your driver inside kernel?
  • What are the function names for the driver you designed?
  • Static Drivers vs Dynamic Driver?
  • Diff SLAB and Vmalloc
  • copy_to_user and copy_from_user?
  • What happens if you load a module without Init and Exit routines?
  • How to create a device file?
  • What is "Major Number"? What is "Minor Number"?
  • What is the tool to watch the kernel logs?
  • How do you pass a value to a module as a parameter?
  • When you declare a symbol in a module as "static" storage type, then where it goes?
  • Steps involved in "Character Device Registration" in Linux2.4?
  • Steps involved in "Character Device Registration" in Linux2.6?
  • Creation of ioctls?
  • How do you write a driver's open() call? Explain briefly.


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