当前位置:网站首页>Subtotal of process thread coordination
Subtotal of process thread coordination
2022-07-29 01:24:00 【:D...】
Catalog
One 、 process Threads coroutines
A process is a unit of resource allocation ;
Thread is CPU Dispatch unit ;
coroutines , Also called tasklet , fibers ; Coroutine is a lightweight thread in user mode
Two 、 The difference between a process and a thread
- address space : A thread is an execution unit in a process , There is at least one thread in the process , They share the address space of the process , The process has its own address space
- Resource ownership : Processes are units of resource allocation and ownership , Threads in the same process share the resources of the process
- Thread is cpu The basic unit of processor scheduling , But the process is not
- Both can be executed concurrently
- Each independent thread has an entry for the program to run 、 Exit of sequential execution sequence and program , But threads can't execute independently , Must exist in the application , Multiple thread execution control provided by the application
3、 ... and The difference between threads and coroutines :
Thread switching will be saved to CPU In my stack , It has its own register context and stack
The main function of a coroutine is to achieve concurrency under the condition of a single thread , But it's actually serial ( image yield equally )
- A thread can have more than one process , A process can also have multiple collaborations alone .
- Thread processes are all synchronization mechanisms , And the process is asynchronous .
- The process can keep the state of the last call , Every time the process reenters , It's equivalent to entering the state of the last call .
4) Threads are resources of coroutines . The agreement passed Interceptor To use the thread resource indirectly .
边栏推荐
- Day2: 130 questions in three languages
- Intel introduces you to visual recognition -- openvino
- 线程锁及锁的升降级
- 可视化全链路日志追踪
- [ManageEngine] help Harbin Engineering University realize integrated monitoring and management of network traffic
- Flask project architecture (First Edition
- 一篇万字博文带你入坑爬虫这条不归路 【万字图文】
- 转:认知亚文化
- regular expression
- Flink SQL Hudi actual combat
猜你喜欢

Seven SQL performance optimizations that spark 3.0 must know
![[Jenkins' notes] introduction, free space; Continuous integration of enterprise wechat; Allure reports, continuous integration of email notifications; Build scheduled tasks](/img/0f/f75603616bd54039f8ccfa3e024768.png)
[Jenkins' notes] introduction, free space; Continuous integration of enterprise wechat; Allure reports, continuous integration of email notifications; Build scheduled tasks

Self-attention neural architecture search for semantic image segmentation

【SQL之降龙十八掌】01——亢龙有悔:入门10题

时间复杂度、空间复杂度的学习总结

Flink Postgres CDC

对接支付宝支付

Interviewer: programmer, please tell me who leaked the company interview questions to you?

【Jenkins笔记】入门,自由空间;持续集成企业微信;allure报告,持续集成电子邮件通知;构建定时任务

Canal real-time parsing MySQL binlog data practice
随机推荐
[MySQL] historical cumulative de duplication of multiple indicators
Dart array, map, type judgment, conditional judgment operator, type conversion
数字孪生轨道交通:“智慧化”监控疏通城市运行痛点
[notes for question brushing] binary linked list to integer
How to carry out engineering implementation of DDD Domain Driven Design
Summary of process and thread knowledge points 2
IT硬件故障的主要原因和预防的最佳实践
Self made | a 16 bit RISC architecture CPU is self-made by hand
(update 20211130) about the download and installation of Jupiter notebook and its own configuration and theme
This article enables you to understand the underlying principle of MySQL- Internal structure, index, lock, cluster
Canal实时解析mysql binlog数据实战
[ManageEngine] help Harbin Engineering University realize integrated monitoring and management of network traffic
mysql 创建索引的三种方式
【idea】查询字段使用位置
redis安装,集群部署与常见调优
时间复杂度、空间复杂度的学习总结
Date conversion EEE MMM DD hh:mm:ss zzz YYYY
一文让你搞懂MYSQL底层原理。-内部结构、索引、锁、集群
“index [hotel/jXLK5MTYTU-jO9WzJNob4w] already exists“
C language bracket matching (stack bracket matching C language)