Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulo-lopes-estevao/go_complex
concurrency and parallelism in GoLang
https://github.com/paulo-lopes-estevao/go_complex
Last synced: about 2 months ago
JSON representation
concurrency and parallelism in GoLang
- Host: GitHub
- URL: https://github.com/paulo-lopes-estevao/go_complex
- Owner: Paulo-Lopes-Estevao
- Created: 2022-12-03T14:45:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-03T22:54:46.000Z (about 2 years ago)
- Last Synced: 2023-03-05T14:38:49.450Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### concepts
Process - process is the instance of a running program.
is instruction set as data and states
A process goes through different states from its inception to its conclusion.
Types of states:
- Creating;
- Ready;
- Running;
- Waiting for external event;
- Waiting;
- Closing;Threds - is a way in which a process of a computer program is divided into two or more tasks that can be executed concurrently,
is the smallest processing unitA process contains at least one thread.
ex: A program that takes two numbers, multiplies one by the other, and returns.
> contains only one execution flow.![alt](https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/images/Chapter4/4_01_ThreadDiagram.jpg)
- A process can have several threads.
- Threads share the same address space.
- Threads execute one independent of the other.
- Thread can run concurrently or parallel.## Goroutines
A goroutine is a lightweight thread managed by the Go runtime.
Goroutines are functions or methods that run concurrently with other functions or methods.
![alt](https://miro.medium.com/max/1400/1*mWUzwICKzj6a2lvyRYV3rg.jpeg)