1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.

Friday, October 7, 2011

device driver interview questions

Device driver interview questions for new commers ,answers will be available soon.

1. Can you tell the memory layout based on Data,BSS,HEAP and STACK ?
2. What is the use of the poll(file, polltable) API ?
3. Tell about the Memory Layout of a Process in Linux ?
4. Tell the relation between malloc() and mmap() ?
5. What is the difference in features between kernel 2.2, 2.4 and 2.6 ?
6. What is a kernel module ?
7. What is the difference between insmod and modprobe ?
8. How will you list the modules ?
9. How do you get the list of currently available drivers ?
10. How will get the driver added into the kernel ? What are Kconfig files ?
11. What are the ways in which linux kernel can be compiled ?
12. What is object file and what are symbols ?
13. Can you tell the memory layout based on Data,BSS,HEAP and STACK ?
14. How will you Access userspace memory from kernel ? What are the various methods ?
15. What is the use of ioctl(inode,file,cmd,arg) ApI ?
16. What is the use of the poll(file, polltable) API ?
17. What is the use of file->private_data in a device driver structure ?
18. What is a device number ?
19. What are the two types of devices drivers from VFS point of view ?
20. What are character devices ?
21. How does the character device driver adds and remove itself from the kernel ?
22. What is the use of register_chrdev and unregister_chrdev ?
23. What is mmap ? MMAP & malloc ? MMAP & brk ? MMAP adv & dis-adv?
24. Advantages of MMAP over Read ?
25. What are Static and Shared libraries ?
26. What is dynamic linking ? What is static linking ?
27. What are the advantages of Dynamic linking or Shared libraries ?
28. Does gcc search for both static and shared libraries ? Which is searched initially by gcc compiler ?
29. What should be done for Shared library based linking in gcc ?
30. What should be done for static library based linking in gcc ?
31. What is the role of interrupts in a device driver ? How are interrupts handled in device driver ?
32. How will you make interrupt handlers as fast as possible ?
33. What are the types of softirqs ?
34. Difference between Timer Softirq and Tasklet Softirq ?
35. What are tasklets ? How are they activated ? when and How are they initialized ?
36. What is task_struct and how are task states maintained ?
37. What is rwlock and spinlock ? Briefly explain about both of them ?
38. When will you use rwlock instead of spinlock ?
39. Can spinlock/rwlock be used in Interrupt handler ?
40. What is Kmalloc and how does it differ from normal malloc ? or Why can't we use malloc in kernel code ?
41. How do you determine the direction of stack growth ?
42. Tell about the method/steps in Linux Kernel Compilation?
43. What is a stack frame, stack pointer & frame pointer ?
44. Tell the role of brk() in malloc / Tell the relation between heap and brk?

 
# #