Understand key concepts in concurrency by solving the dining philosophers problem step by step while discussion different subtle problems and intricacies. Full code in Go is provided towards the end.
Great article! I enjoyed reading this. Would be cool to see a sequel on this where we visualize the eat/think rate of each philosophers to see if some strange pattern emerges. What if we could model the distance too whereby A is more likely to grab B's chopstick etc...
Anyways I'm getting ahead of myself. Great writeup!
Thanks verdi for the comment and the thoughts, modelling how the the think/eat rate changes based in different situations(e.g. with deadlocks, w/o deadlocks, with starvation, etc) is a great idea! I will keep this in mind and maybe code an experiment whenever I have some time.
Happy to hear that you enjoyed the article Gökhan :) and thanks for the tip, indeed substack lacks syntax coloring unfortunately but adding Go playground would be helpful I believe.
Great article! I enjoyed reading this. Would be cool to see a sequel on this where we visualize the eat/think rate of each philosophers to see if some strange pattern emerges. What if we could model the distance too whereby A is more likely to grab B's chopstick etc...
Anyways I'm getting ahead of myself. Great writeup!
Thanks verdi for the comment and the thoughts, modelling how the the think/eat rate changes based in different situations(e.g. with deadlocks, w/o deadlocks, with starvation, etc) is a great idea! I will keep this in mind and maybe code an experiment whenever I have some time.
Great post. You may ad Go Playground links for the code examples.
Happy to hear that you enjoyed the article Gökhan :) and thanks for the tip, indeed substack lacks syntax coloring unfortunately but adding Go playground would be helpful I believe.
I use https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap for taking code screenshots which provide a really nice code reading experience and then you can link out to the Go Playground for someone to copy/paste the code.
Super interesting stuff, hope you'll write more!
Thank you Moncef, I will definitely try to write more content ☺️