当前位置:网站首页>The difference between spin and sleep
The difference between spin and sleep
2022-07-07 01:08:00 【raoxiaoya】
sleep: It is realized by timer , Thread will be suspended , Give up CPU, When the time comes, the operating system will change the thread to the ready state , And join the ready queue waiting to be scheduled .
The spin : It is generally used when robbing the lock , If you fail to grab the lock, spin a certain number of times , Spin operation will call CPU Of PAUSE Instructions .PAUSE Command to do nothing , But it will consume CPU Time , So I won't give up CPU.
边栏推荐
- golang中的atomic,以及CAS操作
- 腾讯云 WebShell 体验
- "Exquisite store manager" youth entrepreneurship incubation camp - the first phase of Shunde market has been successfully completed!
- Data processing of deep learning
- Learn self 3D representation like ray tracing ego3rt
- mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such
- Pytorch中torch和torchvision的安装
- 深度学习简史(一)
- 线段树(SegmentTree)
- Address information parsing in one line of code
猜你喜欢

Tensorflow GPU installation

LLDP兼容CDP功能配置

New feature of Oracle 19C: automatic DML redirection of ADG, enhanced read-write separation -- ADG_ REDIRECT_ DML

城联优品入股浩柏国际进军国际资本市场,已完成第一步
![[牛客] B-完全平方数](/img/bd/0812b4fb1c4f6217ad5a0f3f3b8d5e.png)
[牛客] B-完全平方数

Slam d'attention: un slam visuel monoculaire appris de l'attention humaine

资产安全问题或制约加密行业发展 风控+合规成为平台破局关键
![[Niuke classic question 01] bit operation](/img/f7/e3a482c379ec9bbdb453a05e5e08cb.jpg)
[Niuke classic question 01] bit operation

ARM裸板调试之JTAG原理
![[HFCTF2020]BabyUpload session解析引擎](/img/db/6003129bc16f943ad9868561a2d5dc.png)
[HFCTF2020]BabyUpload session解析引擎
随机推荐
Informatics Olympiad YBT 1171: factors of large integers | 1.6 13: factors of large integers
Summary of being a microservice R & D Engineer in the past year
Learn self 3D representation like ray tracing ego3rt
Configuring the stub area of OSPF for Huawei devices
[Niuke] b-complete square
再聊聊我常用的15个数据源网站
[software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving
[Batch dos - cmd Command - Summary and Summary] - String search, find, Filter Commands (FIND, findstr), differentiation and Analysis of Find and findstr
深入探索编译插桩技术(四、ASM 探秘)
实现mysql与ES的增量数据同步
.class文件的字节码结构
城联优品入股浩柏国际进军国际资本市场,已完成第一步
LLDP兼容CDP功能配置
Data type of pytorch tensor
OSPF configuration command of Huawei equipment
Set (generic & list & Set & custom sort)
【批处理DOS-CMD命令-汇总和小结】-查看或修改文件属性(ATTRIB),查看、修改文件关联类型(assoc、ftype)
mongodb客户端操作(MongoRepository)
Learning notes 5: ram and ROM
golang中的WaitGroup实现原理