当前位置:网站首页>About multithreading
About multithreading
2022-04-21 07:38:00 【Yuxuan won't be bald】
The relationship between process and operating system : Process is the basic unit of resource allocation in operating system ;
Threads are the control flow of a single task , yes CPU Minimum unit of scheduling ;
A process can contain multiple threads , Threads depend on the process ;
lock :
① Pessimistic locking : Pessimistic locks believe that there is a lot of competition between multithreads , The thread grabbing the resource will lock the memory resource , Contention between other threads is not allowed ( For high concurrency , When multithreading )
② Optimism lock : Optimistic lock does not think that multiple threads will rob the same memory resource , It is based on the version number , operational ( Suitable for low concurrency , Fewer threads )
The difference between threads and processes
1. Each process has its own code and data space ( Process context ), Switching between processes can be costly .
2. Threads can be thought of as lightweight processes , Threads belonging to the same process share code and data space , Each thread has a separate running stack and program counter (PC), Low cost of thread switching .
3. The fundamental difference between threads and processes is : A process is a unit of resource allocation , A thread is the unit of scheduling and execution .
4. Multi process : Multiple tasks can be run simultaneously in the operating system ( Program ).
5. Multithreading : Multiple sequential flows execute simultaneously in the same application .
6. Threads are part of the process , So threads are sometimes called lightweight processes .
7. A process without threads can be regarded as a single thread , If there are multiple threads in a process , The execution of a process is not a line ( Threads ) Of , It's multiple lines ( Threads ) Jointly completed .
8. When the system is running, it will allocate different memory areas for each process , But memory is not allocated to threads ( The resource used by a thread is the resource of the process to which it belongs ), Thread groups can only share resources . That is to say , except CPU outside ( The thread needs to occupy when it is running CPU resources ), The allocation of software and hardware resources in a computer has nothing to do with threads , A thread can only share the resources of the process to which it belongs .
版权声明
本文为[Yuxuan won't be bald]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210625095929.html
边栏推荐
- HBuilderX连接夜神模拟器步骤
- JS different time format conversion
- Domestic first USBhub Daquan, USB hub2 0,HUB3. 0, Wangjiu prolific, pl2586, ma8601, and xinrunde SL2 2A、SL2. 2s, replace Tang Ming's Fe1 1、FE1. 1s,, Weifeng vl810
- Any password modification
- 排序方式(3)==>快速排序和归并排序
- Jichuang north, chipone, icn6211, icn6202, Mipi to RGB, Mipi to LVDS, maximum resolution 1080p, Mipi DSI conversion, Mipi conversion,
- 未授权访问漏洞
- Jfinal framework easyexcel plug-in export with pictures
- Huatian OA vulnerability reproduction manual
- Basic concepts of IP Multicast
猜你喜欢

搭建mysql主从复制、读写分离、一主一从

View source parsing

三层交换机与路由器对接上网

MS12_020漏洞
![[untitled] Guoteng GM series, gm8284dd (gm8284dr, lt8218a), gm8285c, gm7123c, lvdsttl to TTL, TTL to single LVDS, TTL digital signal to VGA](/img/d8/2cf707b7e8c711fd9648a70396cfd3.png)
[untitled] Guoteng GM series, gm8284dd (gm8284dr, lt8218a), gm8285c, gm7123c, lvdsttl to TTL, TTL to single LVDS, TTL digital signal to VGA

Any password modification

MS12_ 020 vulnerability

CS5518,MIPI转双路LVDS,替换:国腾的GM8775,东芝TC358775,双路LVDS,国产完美替换,DSI 转双通道 LVDS,,LVDS 时钟频率最高154MHz,1920 x1200

集创北方,Chipone,ICN6211,ICN6202,MIPI转RGB,MIPI转LVDS,分辨率最高1080P,MIPI DSI转换,mipi转换,

时钟IC,INS5101A,I2C低功耗 RTC 实时时钟芯片,替换HYM8563,替换(NXP)PCF8563,TCS8563,I2C低功耗 RTC 实时时钟芯片
随机推荐
搭建mysql主从复制、读写分离、一主一从
Cjc5340,ADC,DAC,替换cs5340,数模转换器,100dB192KHz多位音频A/D转换器,音频Codec100dB192KHz多位音频A/D转换器
You get command and stepping on the pit
PIM-DM
Ms1836s, HDMI to CVBS, video converter, HDMI receiver, built-in MCU and memory
OA vulnerability recovery manual
Longxun series video conversion, lt9211, lt8918, functions: LVDS to bt656, LVDS to Mipi (CSI \ DSI) RGB to Mipi (DSI \ CSI) bt656 \ 601 \ 1120 to hdmi1 4\DVI
任意密码修改
Any user registration & any user password modification
Convergencewarning: Free failed to converse, increase the number of iterations Solutions
2020-12-24
光华芯音频Codec大全CJC4344、CJC8988、CJC5340、CJC6811光华芯音频codec、CJC4344、CJC8988、替换顺芯ES8388、替换cs5340
钢条切割问题最优解
nodered连接数据库
Audio power amplifier, ns4165b single channel 5.3w class AB \ D power amplifier, mainly replacing cs8571, cs8871 and cs5218 of Zhipu core and haa2018 of hailichuang
Missing key(s) in state_ dict: “module.resnet50.conv1.weight“
Echars thermal map custom colors
蕊源RY8132、RY9140 DCDC主要替换:TI的TPS563200、TPS563201,芯源的MP1471、MP1653,矽力杰的SY8104电源芯片详细资料
蓝桥杯——十六进制与十进制之间的转换
File system structure analysis and data recovery