cpu

What is general difference between Superscalar and OoO execution?

荒凉一梦 提交于 2019-11-30 09:05:10
I've been reading some material on superscalr and OoO and I am confused. I think their architecture graphs look very much the same. Superscalar microprocessors can execute two or more instructions at the same time. E.g. typically they have at least 2 ALUs (although a superscalar processor might have 1 ALU and some other execution unit, like a shifter or jump unit.) (More precisely, superscalar processors can start executing two or more instructions in the same cycle. Pipelined processors can execute more than one instruction at a time, but a non-superscalar pipelined processor will only start

How does a single CPU handle Multi-threaded and multi-process applications?

ⅰ亾dé卋堺 提交于 2019-11-30 08:59:23
As I have read that for a multi-process application, a single CPU can handle only one task at a time, switching contexts between two processes. In a multi-threaded application, a single CPU can handle multiple threads. I do not understand this. Does the CPU handle one thread at a time if there is only one CPU? If yes, where is the advantage of having multi-threaded application vs multi-process application if CPU can handle one thing at a time. TL;DR Multithreading on a single core can speed up the application by using thread and instruction level parallelism. If a single CPU has multiple cores

Using OperatingSystemMXBean to get CPU usage

心不动则不痛 提交于 2019-11-30 08:03:26
问题 I'm trying to use Java to get the percentage of CPU used by the currently running Java Virtual Machine. My research has pointed me to using the com.sun.management.OperatingSystemMXBean class. Following examples online, I've written the following: import java.lang.management.ManagementFactory; import com.sun.management.OperatingSystemMXBean; public class TestClass { public static void main (String[] args) { OperatingSystemMXBean bean = (com.sun.management.OperatingSystemMXBean)

How to compute the theoretical peak performance of CPU

心已入冬 提交于 2019-11-30 07:06:05
Here is my cat /proc/cpuinfo output: ... processor : 15 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz stepping : 5 cpu MHz : 1600.000 cache size : 8192 KB physical id : 1 siblings : 8 core id : 3 cpu cores : 4 apicid : 23 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic ... bogomips : 4533.56 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management : This machine has two CPUs, each with 4 cores with hyperthreading capability, so the

Which is faster: x<<1 or x<<10?

眉间皱痕 提交于 2019-11-30 06:19:18
问题 I don't want to optimize anything, I swear, I just want to ask this question out of curiosity. I know that on most hardware there's an assembly command of bit-shift (e.g. shl , shr ), which is a single command. But does it matter (nanosecond-wise, or CPU-tact-wise) how many bits you shift. In other words, is either of the following faster on any CPU? x << 1; and x << 10; And please don't hate me for this question. :) 回答1: Potentially depends on the CPU. However, all modern CPUs (x86, ARM) use

Profile specific animation CPU

旧城冷巷雨未停 提交于 2019-11-30 05:52:30
The situation & problem I have multiple animations (css and javascript/jQuery) in my site and sometimes it makes my site stutter. My question How can I see how much cpu a specific animation (both CSS, JavaScript and jQuery) uses in runtime and execution time I know how I can see the entire site CPU usage but not for a specific animation. Click F12, Go to profiles, click on start. Reload page. Wait untill your page reloaded, and click stop. Click on your profile and see result (Y) Preface: This is not a "complete" answer, as such, but rather the best I could come up within a reasonable amount

Unable to start Genymotion virtual device, incompatible CPU

我只是一个虾纸丫 提交于 2019-11-30 05:36:06
The first time I ran Genymotion virtual device, it had worked. But when I tried running it today, I got this error message What may have changed from the last time I used it? Will be grateful for any solutions that I can get. Thanks. My Device Info: Dell XPS L502X Sandy Bridge motherboard Intel Core i5-2410M @2.30 GHz Windows 7 Professional 64-bit Coderji You need to turn virtualization on. Reboot the notebook. Instantly press F10 to enter BIOS settings (or F2 depending on your PC) Check the settings and look for Intel Virtualization Technology (Aliases: Intel VT-x). Turn it on then save and

Intel CPU Cache Policy

浪子不回头ぞ 提交于 2019-11-30 05:28:35
问题 I have a laptop with an Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz processor. I'm on Ubuntu 12.04 (x86_64) and I'm trying to find some info about my processor. I was able to find most of the information I was looking for using cat /proc/cpuinfo and lscpu What I want to also find out is the cache policy that is used on each cache level. Is it write back or write through? Is there any tool that I can use to find out such info? Thanks in advance. 回答1: This is not something you can query from CPUID

CPU instructions not compiled with TensorFlow

左心房为你撑大大i 提交于 2019-11-30 05:25:52
MacBook Air: OSX El Capitan When I run TensorFlow code in terminal ( python 3 tfpractice.py ), I get a longer than normal waiting time to get back output followed by these error messages: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core

How can i stress my phone's CPU programatically?

a 夏天 提交于 2019-11-30 04:51:01
问题 So i overclocked my phone to 1.664ghz and I know there are apps that test your phone's CPU performance and stressers but I would like to make my own someway. What is the best way to really make your CPU work? I was thinking just making a for loop do 1 million iterations of doing some time-consuming math...but that did not work becuase my phone did it in a few milliseconds i think...i tried trillions of iterations...the app froze but my task manager did not show the cpu even being used by the