Repository navigation
Go Scheduler | Melatoni #3
Replies: 4 comments 5 replies
|
Hi @nghiant3223, this is a really cool blog post diving deep into the Go Scheduler 🚀. That said, after reading through your post, I have a few questions that I'm still a bit confused about. I'd love it if you could help elaborate on a few things I didn’t quite grasp.
Why does it need to wake up another processor
Why does the scheduler place a new goroutine in
So is the main goroutine used alternately by
Could you please elaborate on what it means when you say “another goroutine can be scheduled to run on the same kernel thread”? I’m still a bit confused by that concept. Thank you! |
|
Great article! One small suggestion:
This makes it sound as if a max of 128 fds may be registered with the epoll instance, when in fact many more may be registered - but each call to epoll_wait() will return up to 128 ready fds at a time. |
|
Hi. Thanks for your detailed explanation about Go scheduler! I have a problem and a suggestion. In figure "Non-cooperative preemption in GMP model", G1(main) is put into the runq after it is woken up. But the problems are: How is it woken up? How is it put into runq? Why not put into globrunq/runnext? I took some time to find the solution in the code through guess and I believe it's better to mention the code where G1 is woken up and where G1 is put into runq. When I reached the figure, the only information related to the action in the previous literature was:
I can't continue to infer according to the figure because I can't find related code. After investigation, the answer I get is that when G1(main) is woken up by
The suggestion is attaching |
|
Great diagram! I just noticed a small detail regarding the overflow mechanism. |
Uh oh!
There was an error while loading. Please reload this page.
Go Scheduler | Melatoni
↑ ↓
https://nghiant3223.github.io/2025/04/15/go-scheduler.html
All reactions