cpu

Calculating CPU frequency in C with RDTSC always returns 0

Hi, The following piece of code was given to us from our instructor so we could measure some algorithms performance: #include <stdio.h> #include <unistd.h> static unsigned cyc_hi = 0, cyc_lo = 0; static void access_counter(unsigned *hi, unsigned *lo) { asm("rdtsc; movl %%edx,%0; movl %%eax,%1" : "=r" (*hi), "=r" (*lo) : /...

why does an infinite loop trash the CPU?

I know an infinite loop creates a CPU problem. But, I don't quite understand why. Can anyone explain that to me. Thanks! ...

Cannot change the target CPU to x86 Or x64 in Visual Studio 2005

I am trying to build a website application and specify the target CPU as x86 instead of Any CPU. The only choices I have in Configuration Manager under the "Active solution platform:" drop-down list are: "Any CPU", "Edit..", and "New...". In the "Project Contexts" portion of the "Configuration Manager" window, it lists 3 columns: "Proje...

Why does this Java code not utilize all CPU cores?

The attached simple Java code should load all available cpu core when starting it with the right parameters. So for instance, you start it with java VMTest 8 int 0 and it will start 8 threads that do nothing else than looping and adding 2 to an integer. Something that runs in registers and not even allocates new memory. The prob...

Quick CPU ring mode protection question

Hi, me again :) I am very curious in messing up with HW. But my top level "messing" so far was linked or inline assembler in C program. If my understanding of CPU and ring mode is right, I cannot directly from user mode app access some low level CPU features, like disabling interrupts, or changing protected mode segments, so I must use ...

Why this code generates different numbers?

Hello, I have this function that creates a unique number for hard-disk and CPU combination. GetVolumeInformation(drv, szNameBuffer, 256, &dwHddUnique, NULL, NULL, NULL, NULL); SYSTEM_INFO si; GetSystemInfo(&si); dwProcessorUnique = si.dwProcessorType + si.wProcessorArchitecture + si.wProcessorRevision; dwUniqueKey...

CPU usage extremely high on TS deployment

Hi, Our application is written in .NET (framework 3.5). We are experiencing problems with the applications performance when deployed in a terminal services environment. The client is using a TS farm. They have 4GB ram and a decent xeon processor. When the application is opened in this environment, it sits at 25% CPU usage even when id...

Looking for a micro programmable FPGA + machine

Hi! I'm looking for a FPGA + machine. It should be entry level pricing (e.g no more than $200). EDIT: I want to make an ASM chart and program the FPGA to act like I specified in the chart ...

In a CPU all the memory Signals and DATA go through the memoryController, right?

for example: When the MEM CTRLER wants a instruction register to be populated with the DATA which the next ADDR REGISTER points to. Does it send a signal to the ADDR REGISTER to place the next ADDR on the ADDR bus or does the ADDR go to the MEM CTRLER and is placed on the BUS by the MEM CTRLER? ...

CPU floating operations cost

I'm interesting in the time cost on a modern desktop CPU of some floating point operations in order to optimize a mathematical evaluation. In particular I'm interested on the comparison between complex operations like exp, log and simple operation like +, *, /. I tried to search for this information, but I could't find a source. What ...

Large Scale VHDL modularization techniques

I'm thinking about implimenting a 16 bit CPU in VHDL. A simplish CPU. ADD, MULS, NEG, BitShift, JUMP, Relitive Jump, BREQ, Relitive BREQ, i don't know somethign along these lines> Probably all only working with 16bit operands. I might even cut it down and use only a single operand and a accumulator. With Some status regitsters, Carry, Ze...

Does a CPU assigns a value atomically to memory?

Hi! A quick question I've been wondering about for some time; Does the CPU assign values atomically, or, is it bit by bit (say for example a 32bit integer). If it's bit by bit, could another thread accessing this exact location get a "part" of the to-be-assigned value? Think of this: I have two threads and one shared "unsigned int" var...

C# WPF abnormal CPU usage for animation

I am developing WPF application and client reports extreamly high CPU usage (90%) (whereas i am unable to repeat that behavior). I have traced bootleneck down to these lines. It is simple glowing animation for small single led control (blinking led). What could be reason for this simple annimation taking up SO huge CPU resources? ...

Threading vs single thread

Is it always guaranteed that a multi-threaded application would run faster than a single threaded application? I have two threads that populates data from a data source but different entities (eg: database, from two different tables), seems like single threaded version of the application is running faster than the version with two thre...

asp.net high cpu when traversal HttpRuntime.Cache (.net 3.5)

I'm encountering a high CPU issue that when do this job: foreach(var c in System.Runtime.Cache) ... from windbg I can see: 0:043> !clrstack OS Thread Id: 0x2d9c (43) * WARNING: Unable to verify checksum for System.Web.Mvc.ni.dll Child-SP RetAddr Call Site 000000000b83e110 00000642bcffe63b System.Web.Caching.CacheSingl...

Algorithms FPGAs dominate CPUs on

Hi! For most of my life, I've programmed CPUs; and although for most algorithms, the big-Oh running time remains the same on CPUs / FPGAs, the constants are quite different (for example, lots of CPU power is wasted shuffling data around; whereas for FPGAs it's often compute bound). I would like to learn more about this -- anyone know o...

How to simulate different CPU frequency and limit RAM

Hi I have to build a simulator with C#. This simulator should be able to run a second thread with configureable CPU speed and limited RAM size, e.g. 144MHz and 50 MB. Of course I know that a simulator can never be as accurate as the real hardware. But I try to get almost similar performance. At the moment I'm thinking about creating a th...

How can I access cpu temperature readings using c#?

For a programming project I would like to access the temperature readings from my CPU and GPUs. I will be using C#. From various forums I get the impression that there is specific information and developer resources you need in order to access that information for various boards. I have a MSI NF750-G55 board. MSI's website does not hav...

Using iframe to load Video Chat Page from different Web Address is a best option to saves the CPU usage of Host server?

I have a Social Community Website and I want to add Video Chat,but if i add directly video chat in my WebSite then it will slow down my web server. for example. http://welinked.com/myvideochat.php if i load my Video Chat program in this page in WeLinked Domain,then it will slows down the other features of my website,and CPU usage of t...

How can I get CPU load per core in C#?

Hi, How can I get CPU Load per core (quadcore cpu), in C#? Thanks :) ...