Get the latest tech news

Understanding the Go Scheduler


↑ ↓

Trace visualization when non-cooperative preemption happensBy zooming out (pressing ‘S’) and scrolling slightly to the right, it can be observed that G10 is later replaced by another goroutine, G9, which is the next instance running the fibonacci function. Another important point is that whenever a processor P is in syscall state, it can't be taken up by another thread M to execute code until sysmon happens to seize it or until the system call is completed. Due to the performance limitations of select and poll —as explained in this —Go avoids them in favor of more scalable alternatives: epoll on Linux, kqueue on Darwin, and IOCP on Windows.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of scheduler

scheduler

Related news:

News photo

Nvidia open sources Run:ai Scheduler to foster community collaboration

News photo

Show HN: rallyup – Lightweight Wake-on-LAN Scheduler

News photo

The long road to lazy preemption in the Linux CPU scheduler