当前位置:网站首页>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.
边栏推荐
- 再聊聊我常用的15个数据源网站
- [user defined type] structure, union, enumeration
- 做微服务研发工程师的一年来的总结
- Maidong Internet won the bid of Beijing life insurance to boost customers' brand value
- ARM裸板调试之JTAG调试体验
- OSPF configuration command of Huawei equipment
- Niuke cold training camp 6B (Freund has no green name level)
- Deep learning environment configuration jupyter notebook
- Data processing of deep learning
- The printf function is realized through the serial port, and the serial port data reception is realized by interrupt
猜你喜欢

筑梦数字时代,城链科技战略峰会西安站顺利落幕

Tensorflow GPU installation

Niuke cold training camp 6B (Freund has no green name level)

《安富莱嵌入式周报》第272期:2022.06.27--2022.07.03
![Explain in detail the matrix normalization function normalize() of OpenCV [norm or value range of the scoped matrix (normalization)], and attach norm_ Example code in the case of minmax](/img/87/3fee9e6f687b0c3efe7208a25f07f1.png)
Explain in detail the matrix normalization function normalize() of OpenCV [norm or value range of the scoped matrix (normalization)], and attach norm_ Example code in the case of minmax

Part VI, STM32 pulse width modulation (PWM) programming
Summary of being a microservice R & D Engineer in the past year

「精致店主理人」青年创业孵化营·首期顺德场圆满结束!
![[software reverse automation] complete collection of reverse tools](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[software reverse automation] complete collection of reverse tools
![[100 cases of JVM tuning practice] 04 - Method area tuning practice (Part 1)](/img/7a/bd03943c39d3f731afb51fe2e0f898.png)
[100 cases of JVM tuning practice] 04 - Method area tuning practice (Part 1)
随机推荐
做微服务研发工程师的一年来的总结
【JVM调优实战100例】05——方法区调优实战(下)
界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
力扣1037. 有效的回旋镖
New feature of Oracle 19C: automatic DML redirection of ADG, enhanced read-write separation -- ADG_ REDIRECT_ DML
Dell Notebook Periodic Flash Screen Fault
Zabbix 5.0:通过LLD方式自动化监控阿里云RDS
Advantages and disadvantages of code cloning
Return to blowing marshland -- travel notes of zhailidong, founder of duanzhitang
pytorch之数据类型tensor
Niuke cold training camp 6B (Freund has no green name level)
Chapter II proxy and cookies of urllib Library
STM32开发资料链接分享
动态规划思想《从入门到放弃》
Part 7: STM32 serial communication programming
Summary of being a microservice R & D Engineer in the past year
ARM裸板调试之JTAG原理
深度学习简史(二)
Configuring OSPF basic functions for Huawei devices
Levels - UE5中的暴雨效果