空操作处理的英特尔处理器 [英] Dummy operations handling of Intel processor

查看:213
本文介绍了空操作处理的英特尔处理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

诚然,我都有点愚蠢的问题。基本上,我想知道如果
也有采用Intel处理器能够有效地提供了一些特殊的机制
执行一系列假人,即NOP指令?举例来说,我能想象有
可能是某种pre取标识瑞尔机制,他们丢弃
并试图代替取一些有用的指导。或者,这些瑞尔出动
到执行单元为正常的指令,这意味着我可以大致过程
5 NOP指令每个周期(假设下,有5执行单元)

Admittedly, I have a bit silly question. Basically, I am wondering if there are some special mechanisms provided by Intel processors to efficiently execute a series of dummy, i.e., NOP instructions? For instance,I could imagine there could be some kind of pre-fetch mechanism that identifies NOPS, discards them and tries to fetch some useful instructions instead. Or are these NOPS dispatched to the execution unit as normal instructions, meaning that i can roughly process 5 nops each cycle (under the assumption that there are 5 execution units)

谢谢,
莱因哈德

Thanks, Reinhard

推荐答案

丢弃它们将是pretty坏主意:他们通常用于忙等待。如果你放弃 NOP S,你让你的等待环更严格的比它应该是和潜在的引进相当大的通信开销。

Discarding them would be pretty bad idea: they are often used for busy-waiting. If you discard NOPs, you make your wait-loop much tighter than it should be and potentially introduce considerable communications overhead.

如果您觉得 NOP 是低效的,你可以尝试 HLT 节省一些能量。或者,你甚至可以发送CPU进入睡眠状态。但是,如果你想为一个相当长的时间的的,他们通常需要suvervisor权限。

If you feel that NOPs are inefficient, you could try HLT which saves some energy. Or you could even send the CPU into a sleep state. However, these only make sense if you want to "do nothing" for a considerable amount of time and they usually require suvervisor privileges.

这篇关于空操作处理的英特尔处理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆