System Programming Interview Questions

Image credit: WeGraphics

System Programming Interview Questions

  1. How will you write a driver for a device? Design parameter..?
  2. Have you used IPC mechanism? Define individual pros and cons.
  3. Are you aware about Linux Memory Management?
  4. How will you allocate memory in interrupt handler?
  5. What are the things you care while writing an interrupt handler?
  6. What are physical address and virtual address? Why we use virtual address?
  7. Why (void *) is used when passing an argument in pthread_create()?
  8. Which posix API is used to create a thread?
  9. How free() knows how much memory needs to be free?
  10. What is AMP? How synchronization done in AMP system?
  11. What are the different synchronization mechanisms?
  12. What is the difference between binary semaphore and mutux?
  13. What are the minimum requirements to write a C language program?
  14. How do you find loop in a linked list?
  15. What is virtualization?
  16. What is structure padding?
  17. Is there any way to tell the compiler to avoid structure padding?
  18. What is a page write?
  19. Have you ever faced cache related issue? If yes then how will you resolve it?
  20. Why we need to flush the cache?
  21. What is priority inversion?
  22. What are the pre processors?
  23. Write a macro for SET_BIT( value, from bit, to bit)
  24. What are the different segments is executable? Describe individual usage.
  25. What are ELF file format? Describe its different sections.
  26. How file system is implemented in Linux OS?
  27. Write a program to reverse a string.
  28. How will you debug your driver?
  29. What is the difference between a malloc() and a calloc()?
  30. What is a “Flat Memory” model?
  31. What is the difference between an exception and interrupt?
  32. Describe the interrupt handling mechanism in OS from the point hardware generate an interrupt till its exception handler gets called.
  33. How will you write a program in c which takes variable number of parameters?
  34. From which flash (NAND or NOR) code can execute? (No need to load into RAM)
  35. What is volatile variable? When it is used? What compiler dose with volatile variable?
  36. What is difference between kmalloc() and vmalloc()?
  37. How can we map a physical address in linux?
  38. What id endiness? How to find the endiness of a machine? Write a program.
  39. What are the things taken care while writing an endiness free program?
  40. Write a code to page alignment.
  41. Can we find the address of a variable type Register? How compile response with it?
  42. What are the advantages of macros?
  43. Write a program for dynamic allocation of 2D array.
  44. Is it possible to allocate memory in Stack? How?
  45. What are top-half and bottom-half?
  46. What is the difference between softirq, taskelt and workqueue?
  47. Where spin locks are used apart from interrupt handler?
  48. Where semaphores are used?
  49. How interrupt gets registered in Linux? What is the return value of that function?
  50. How will you design / write a new BSP?
  51. How will you flash an image to dead board?
  52. What are the difference between char and block drivers?
  53. Is spinlock available in uni-processor system?
  54. Can a variable be both volatile and constant?
  55. Can a pointer be volatile?
  56. What malloc(0) will return?
  57. Difference between const char A and char const A?
  58. Write a program to insert a node in double linked list.
  59. Write a program to count number of set bits in a 32 bit integer.
  60. Write a macro to get offset of its variable macro(element, struct_t).
  61. What is system call? Why asm linkage is used?