0

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
asked Feb 26, 2011 at 4:13

1 Answer 1

1

Some sample questions:

  1. How do you list out all the threads?
  2. How do you set breakpoints in individual threads?
  3. How do you see stacktrace of a particular thread?
  4. 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.
community wiki

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.