- Distributed Computing with Go
- V.N. Nikhil Anurag
- 143字
- 2021-06-24 18:36:11
OS thread or machine
Initially, the OS threads or machines are created by and managed by the OS. Later on, the scheduler can request for more OS threads or machines to be created or destroyed. It is the actual resource upon which a goroutine will be executed. It also maintains information about the main goroutine, the G currently being run on it, thread local storage (tls), and so on:
// Denoted as M in runtime type m struct { g0 *g // goroutine with scheduling stack tls [6]uintptr // thread-local storage (for x86 extern register) curg *g // current running goroutine p puintptr // attached p for executing go code (nil if not executing go code) id int32 createstack [32]uintptr // stack that created this thread. spinning bool // m is out of work and is actively looking for work // ... }
推薦閱讀
- Linux運維之道(第3版)
- Kubernetes修煉手冊
- 阿里云數(shù)字新基建系列:云原生操作系統(tǒng)Kubernetes
- Learn Helm
- Windows Phone 7.5 Data Cookbook
- Installing and Configuring Windows 10:70-698 Exam Guide
- Windows Server 2012網(wǎng)絡(luò)操作系統(tǒng)企業(yè)應(yīng)用案例詳解
- Windows 7案例教程
- AWS SysOps Cookbook
- 新編電腦辦公(Windows 10+ Office 2013版)從入門到精通
- Windows 7實戰(zhàn)從入門到精通
- Learn CUDA Programming
- Learning BeagleBone
- Azure Resource Manager Templates Quick Start Guide
- Linux指令從初學(xué)到精通