- 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 // ... }
推薦閱讀
- UNIX操作系統設計
- Learn Helm
- 嵌入式應用程序設計綜合教程(微課版)
- 深入Linux內核架構與底層原理(第2版)
- Linux自動化運維:Shell與Ansible(微課版)
- 網絡操作系統教程:Windows Server 2016管理與配置
- Learning Magento 2 Administration
- jQuery UI Cookbook
- Python UNIX和Linux系統管理指南
- 從實踐中學習Windows滲透測試
- Windows Server 2008組網技術與實訓(第3版)
- Azure Resource Manager Templates Quick Start Guide
- 每天5分鐘玩轉Docker容器技術
- Getting Started with Raspberry Pi Zero
- Drupal 7 Mobile Web Development Beginner’s Guide