Can someone please tell me interview type questions related to multithreading and GDB.
I already know Deadlock, race condition, synchronization and basics of threads.
Thanks in advance
Jeremiah Willcock
31.2k8 gold badges81 silver badges79 bronze badges
1 Answer 1
Some sample questions:
- How do you list out all the threads?
- How do you set breakpoints in individual threads?
- How do you see stacktrace of a particular thread?
- Your program is in a deadlock; How do you find the root cause using gdb?
There is no end to questions. I would suggest that the best way to learn is to get knees deep in the dirt and play for yourself:
- Make a sample multi-threaded program, debug it and try to find all possible info about all the threads.
- Put some deadlock situation, and then debug it.
Sign up to request clarification or add additional context in comments.