当前位置:网站首页>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.
边栏推荐
- 【批处理DOS-CMD命令-汇总和小结】-跳转、循环、条件命令(goto、errorlevel、if、for[读取、切分、提取字符串]、)cmd命令错误汇总,cmd错误
- Let's talk about 15 data source websites I often use
- 【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
- Address information parsing in one line of code
- 第七篇,STM32串口通信编程
- What kind of experience is it to realize real-time collaboration in jupyter
- Configuring OSPF basic functions for Huawei devices
- Interface (interface related meaning, different abstract classes, interface callback)
- Oracle:CDB限制PDB资源实战
- Installation of torch and torch vision in pytorch
猜你喜欢
[HFCTF2020]BabyUpload session解析引擎
Building a dream in the digital era, the Xi'an station of the city chain science and Technology Strategy Summit ended smoothly
[force buckle]41 Missing first positive number
【案例分享】网络环路检测基本功能配置
《安富莱嵌入式周报》第272期:2022.06.27--2022.07.03
重上吹麻滩——段芝堂创始人翟立冬游记
[牛客] [NOIP2015]跳石头
详解OpenCV的矩阵规范化函数normalize()【范围化矩阵的范数或值范围(归一化处理)】,并附NORM_MINMAX情况下的示例代码
[Niuke classic question 01] bit operation
Telerik UI 2022 R2 SP1 Retail-Not Crack
随机推荐
筑梦数字时代,城链科技战略峰会西安站顺利落幕
Tensorflow 1.14 specify GPU running settings
pyflink的安装和测试
[software reverse automation] complete collection of reverse tools
pyflink的安装和测试
腾讯云 WebShell 体验
Do you understand this patch of the interface control devaxpress WinForms skin editor?
界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
Levels - UE5中的暴雨效果
Let's talk about 15 data source websites I often use
迈动互联中标北京人寿保险,助推客户提升品牌价值
A brief history of deep learning (I)
[牛客] [NOIP2015]跳石头
Installation of torch and torch vision in pytorch
Meet the level 3 requirements of ISO 2.0 with the level B construction standard of computer room | hybrid cloud infrastructure
线段树(SegmentTree)
第五篇,STM32系统定时器和通用定时器编程
ARM裸板调试之JTAG调试体验
随时随地查看远程试验数据与记录——IPEhub2与IPEmotion APP
windows安装mysql8(5分钟)