Monday, July 5, 2010

Linux and Linux Device driver

Linux is one of the very common Operating Systems and hope many would like to have some linux discussion. Here is a collection of questions for our linux and linux device driver related discussion...

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

8 comments:

  1. thanks boss very good questions

    ReplyDelete
  2. It will be really helpful if you can post the answers as well... Thanks in advance... :)

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. please provide these questions efficeant answars with explanation please

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. if don't mind please post answers also.

    ReplyDelete