Print last n nodes of a linked list you only have pointer to Head
Linux Software Engineer Interview Questions
157 linux software engineer interview questions shared by candidates
Write a code which gets an array of size N with Natural numbers in it. The code needs to give every time a differet permutation of itself.
The questions were about data structures,threads,networking, algorithms.If you're well prepared I think it won't be a problem to pass.
Explain what happens when an interrupt occurs.
Only one developer asked coding question related to strings, to detect palindrome. Test lead asked questions on syntax, semantics of C-code, git-squash, static code analysis and run-time analysis.
Questions were mostly about C/C++ e.g. pointers, Memory Management, Operating Systems, and OOPs in C++ such as virtual functions.
Compare and contrast an array and a linked list. Which operates faster in a loop? Why?
How do you check if 2 buffers overlap?
CONTINUED HERE AS 5000 CHARACTERS LIMIT SIZE IN THE ABOVE COLUMN -------------------------TECHNICAL ROUND I -------------------------- (2 hours 45 min -very lengthy round i have ever had) Q1) Introduce yourself technically. Q2) Asked about my projects. Q3) Asked about my educational background. Q4) How will you proceed if the kernel source code that you downloaded does not support your board? What are the steps you will take? Q5) Write all the directories in linux that will be visible to you on your system and the directories of your kernel source code that you have downloaded. Differentiate between both. (Here he asked me whether I am sure of my answers that I wrote wherein I was too confused ) Q6) What is procfs ? What is the importance of procfs? Why it has got that name? Q7) What is sysfs ? Q8) What does /dev contain? Q9) How do you create node for a block device? Q10)How do you automatically get major number without using udev ? (He asked bcoz I answered udev will automatically update. He wants me to answer by not using udev functions) Q11)Can the same number be used for creating nodes for both char and block devices? Q12)Draw the block diagram for a char device driver implementation? (I explained about char device driver by writing all steps. He then asked me further questions ) Q13)Where file_operations have been used in registration? ( I answered cdev_init(my_cdev,&my_fops) and wrote all steps) Q14)What happens if you pass major number as 0 in register_chrdev_region()? Q15)Can you make your low-level driver directly interact with application without using core layer ? Is core layer mandatory? ( He asked me this question because I drew the block diagram for keyboard low-level driver with core layer and HLD) Q16)You have registered your file_operations with VFS layer. What about ISR routine and how will you register ? Q17)How your driver initialization will take place? What is the entry point for a driver? (I answered abt init and exit routines and drivers, modules and kernel service routines do not have pids. So they are invoked in process contexts. He then asked again questions) Q18)What is a PCB? Q19)What is a Stack section? Q20)How will be variables allocated in memory? How will you access heap? Q21)How many types of interrupts are there? (I answered software and hardware. I also said abt Bottom halves) Q22)What is the difference betw. various BHs and where do you apply? Q23)Is there any precaution for softirqs running simultaneously? Why and how do you solve? (I answered: applying synchronization techniques for shared access) Q24)Difference betw. various synchronization techinques and when do you need? Q25)Why semaphores are not used for ISRs? Q26)How do you implement threads? Q27)What is the basic difference betw. multiple processes and multiple child processes? Q28)Did you write any applications? ( I said no.) Q29)Write a small application to read 4 bytes and write 4 bytes for my device /dev/ttyS0. (As it was very simple. I wrote it and he then stopped as if he were satisied by my answers. A Very long interview!) -------------------------TECHNICAL ROUND II -------------------------- (30 min) Q1) Introduce about yourself and about your work so far. Q2) Questions on all my projects. Q3) Few questions about my background. Q4) How would you allocate memory in kernel? Q5) Write a data structure with integer and character as its elements. Q6) What is the size of this data structure? (I answered about structure padding as he was expecting the same answer from me) Q7) Allocate memory in heap by using the above data structure. How will you allocate then in stack? Q8) Initialize the above data structure. Implement a function by using which print the values of the data structure elements. Q9) Asked me to correct some logic about deleting a given node in linked list. Q10)Asked some personal questions and some discussion went on package ****** END OF INTERVIEW AT 4.24PM****** MOST DIFFICULT QUESTION: Comparison of the source code with the current kernel running on my system
difference among Sequences container: vector, deque, list difference among associate container: set, map, hash difference among smart pointer: std::unique_ptr, std::shared_ptr, std::weak_ptr difference between struct and class read C++ code and give result: related to virtual function and template Shell and Python questions: awk print column, Python dictionary Use C++ to realize a class: understand map, pair, struct, operator overload, class
Viewing 1 - 10 interview questions