当前位置:网站首页>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.
边栏推荐
- 用tkinter做一个简单图形界面
- Slow database query optimization
- 【JVM调优实战100例】05——方法区调优实战(下)
- Dynamic planning idea "from getting started to giving up"
- [100 cases of JVM tuning practice] 04 - Method area tuning practice (Part 1)
- mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such
- 第五篇,STM32系统定时器和通用定时器编程
- 深度学习简史(二)
- 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
- Installation and testing of pyflink
猜你喜欢
Deep learning environment configuration jupyter notebook
windows安装mysql8(5分钟)
详解OpenCV的矩阵规范化函数normalize()【范围化矩阵的范数或值范围(归一化处理)】,并附NORM_MINMAX情况下的示例代码
资产安全问题或制约加密行业发展 风控+合规成为平台破局关键
随时随地查看远程试验数据与记录——IPEhub2与IPEmotion APP
力扣1037. 有效的回旋镖
筑梦数字时代,城链科技战略峰会西安站顺利落幕
[牛客] B-完全平方数
Five different code similarity detection and the development trend of code similarity detection
boot - prometheus-push gateway 使用
随机推荐
View remote test data and records anytime, anywhere -- ipehub2 and ipemotion app
斗地主游戏的案例开发
【JokerのZYNQ7020】AXI_ EMC。
Niuke cold training camp 6B (Freund has no green name level)
Cause of handler memory leak
ARM裸板调试之JTAG调试体验
Js+svg love diffusion animation JS special effects
再聊聊我常用的15个数据源网站
pyflink的安装和测试
批量获取中国所有行政区域经边界纬度坐标(到县区级别)
「笔记」折半搜索(Meet in the Middle)
用tkinter做一个简单图形界面
Data processing of deep learning
[HFCTF2020]BabyUpload session解析引擎
Leetcode (547) - number of provinces
Deep learning environment configuration jupyter notebook
Deep understanding of distributed cache design
Come on, don't spread it out. Fashion cloud secretly takes you to collect "cloud" wool, and then secretly builds a personal website to be the king of scrolls, hehe
Tensorflow GPU installation
Interface (interface related meaning, different abstract classes, interface callback)