A scheduler is responsible for distributing the amount of work that needs to be done over the available resources in an efficient way. In this section, we will examine the way that the Go scheduler operates in much greater depth than in the previous chapter. As you already know, Go works using the m:n scheduler (or M:N scheduler). It schedules goroutines, which are lighter than OS threads, using OS threads. First, though, let us review the necessary theory and define some useful terms.
Go uses the fork-join concurrency model. The fork part of the model states that a child branch can be created at any point of a program. Analogously, the join part of the Go concurrency model is where the child branch ends and joins ...