- 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 // ... }
推薦閱讀
- Citrix XenApp Performance Essentials
- Ansible權威指南
- Java EE 8 Design Patterns and Best Practices
- Python基礎教程(第3版)
- 嵌入式系統(tǒng)及其應用(第三版)
- 計算機系統(tǒng)的自主設計
- Cassandra 3.x High Availability(Second Edition)
- Windows 7使用詳解(修訂版)
- Getting Started with UDK
- Mastering AWS CloudFormation
- Azure Serverless Computing Cookbook
- 分布式實時處理系統(tǒng):原理、架構與實現
- Linux網絡操作系統(tǒng)項目教程(RHEL 6.4/CentOS 6.4)(第2版)
- 數字系統(tǒng)設計與VHDL
- 計算機操作系統(tǒng)實用教程