Multithreading causing debugging problems
Posted: Sat Apr 08, 2017 3:22 pm
Hello,
I have recently implemented multithreading in my kernel - there's a thread for the keyboard driver, and one for the graphics driver. It seems that moving to a multithreaded kernel causes you to lose determinism in how your OS behaves, which makes it very difficult to debug.
I've added a few helper functions to "lock" the scheduler (for important, non-interruptable processes) but am having some issues with a few "random" bugs.
Can anyone give me tips on how to debug such a non-deterministic system? How have you all remedied this problem? I think I need an outside perspective on this, kind of banging my head against the wall here!
I have recently implemented multithreading in my kernel - there's a thread for the keyboard driver, and one for the graphics driver. It seems that moving to a multithreaded kernel causes you to lose determinism in how your OS behaves, which makes it very difficult to debug.
I've added a few helper functions to "lock" the scheduler (for important, non-interruptable processes) but am having some issues with a few "random" bugs.
Can anyone give me tips on how to debug such a non-deterministic system? How have you all remedied this problem? I think I need an outside perspective on this, kind of banging my head against the wall here!