cpu

Turbo C 3.0 and lower versions were really using high CPU power?

I am using Turbo C 3.0 and Turbo c 2.0 for the programming. Added to this I am using Windows XP. While using Windows 98, the above said programs were really worked fine. But after installing XP, those programs were really slow-down my system. Those were really using high CPU power even when idle(idle refers to "no interaction between pro...

Is there a relation between integer and register sizes?

Recently, I was challenged in a recent interview with a string manipulation problem and asked to optimize for performance. I had to use an iterator to move back and forth between TCHAR characters (with UNICODE support - 2bytes each). Not really thinking of the array length, I made a curial mistake with not using size_t but an int to it...

Will multi threading provide any performance boost?

Hello everyone, I am new to programming in general so please keep that in mind when you answer my question. I have a program that takes a large 3D array (1 billion elements) and sums up elements along the various axis to produce a 2D array of a projection of each side of the data. The problem here is that it is very ram intensive as th...

Profiling CPU usage of ASP.NET web app - but not the database!

I'm seeing consistently high CPU usage for my ASP.NET web application (on the live production box only, naturally....!) and I'm trying to narrow down the cause - it's basically maxing out a quad core Xeon box and there's no way it should be able to do that! The CPU usage of the web process is generally higher than that of the DB proces...

What are a few time-consuming operations in C?

I'm looking to write a quick benchmark program that can be compiled and run on various machines. Rather than using commercially/open-sourceally available options, I'd rather have my own to play around with threading and algorithm optimization techniques. I have a couple that I use already, which include recursively calculating the nth n...

To analyse CPU consumption of Firefox addons in SO

I currently analyse inefficient Firefox addons by uninstalling them and seeing empirically in a long run whether the addon was a problem or not. However, this way of finding the inefficient addons is very time-consuming. I would like to know exact numerical ways to see the CPU consumption for each addon independently in Firefox the C...

java: datainputstream: do read calls take up processor time while waiting for data?

If I call read() on a DataInputStream, will it take up CPU cycles waiting for data or does it yield the current thread and get woken up by an interrupt signaling that data has arrived? My motivation for asking the question is to determine whether or not a stream reader needs to be in its own thread or not. A blocking read that takes up...

Will a task be completed faster if it is the active window?

Hey everyone, I have heard a myth that a job will finish faster if it is kept as the active window, and not in the background or minimized. Is there any truth to this? Does the CPU put precedence to tasks where this happens? Thanks, ...

CPU load of the running process

I need to programmatically know (c/c++) what is the instant CPU load of the current running process. Win32 API offers a lot of low level API but I am unable to find one that gives me the current CPU load of my running c/c++ program. The question is: how to programmatically know how many percents of CPU load the current process is using....

How to Find CPU Utilization of a Single Thread within a Process

Hi All, I am looking a Tool on How to Find CPU Utilization of a Single Thread within a Process in VC++. It would be great full if any one could provide me a tool. Also it could be better if you guys provide how to do programmatically. Thank you in Advance. ...

Throttling CPU/Memory usage of a Thread in Java?

I'm writing an application that will have multiple threads running, and want to throttle the CPU/memory usage of those threads. There is a similar question for C++, but I want to try and avoid using C++ and JNI if possible. I realize this might not be possible using a higher level language, but I'm curious to see if anyone has any idea...

CPU Stuck at 100% on Customer PC, any debugging suggestions?

Hi all. I'm having a dead-end situation with one of the clients using my software. Out of about 40 copies of our product sold (Application programmed in .NET 2.0 using VB.NET 2005), about 2 get non-responsive with 1 core of the dual core CPUs stuck at 100% (program uses 1 core only) The most logical guess is an infinite loop causing th...

Alignment along 4-byte boundaries

I recently got thinking about alignment... It's something that we don't ordinarily have to consider, but I've realized that some processors require objects to be aligned along 4-byte boundaries. What exactly does this mean, and which specific systems have alignment requirements? Suppose I have an arbitrary pointer: unsigned char* ptr...

In Windows PowerShell, How Can You Set the Maximum CPU % for the Script to Use?

I am looking to limit the percentage of the CPU time used by a PowerShell process to a certain number -- for the sake of argument, let's imagine it to be 13%. Other options that are not precisely what I need: 1) Setting priority. 2) Setting CPU affinity. Basically, we have monitoring software which complains if the total CPU usage gets...

Number of CPU sockets, or location of SMBIOS on OS X

I would like to find the number of cpu sockets on OS X machines. This information is normally in the SMBIOS on pc's. Newer Intel Macs use EFI but I have read that the EFI does also contain an SMBIOS block. I therefore appear to need access to the SMBIOS data block on power pc machines, and the EFI, SMBIOS section on Intel macs. Any sug...

Is there any relation between CPU and threads??

if yes,what is the relation? ...

How can i access the Intel CPU Counter

Is there any small tool that gives me access to the data gathered by the Intel CPU Counters (like L1/L2 cache misses, branch prediction failures ... you know there are hunderts of them on modern Core2 CPU's). It must work on Windows (while being able to use it with Solaris, FreeBSD, Linux, MacOSX would of course be nice). ...

Conversion from K2SEC or kSI2Ks to secs or mins

Hi, Since CPU's clock their cycles in kSI2Ks or K2SEC time units. I am wondering if some body know how to convert them in to seconds/minutes. Thanks, Omer ...

c# calculate CPU usage for a specific application

Hi, I'm trying to figure out how to get the CPU usage for a particular process but can only find information relating to overall CPU usage. Does anyone know how to extract the current CPU usage in percentage terms for a specific application? ...

Is there any .Net JIT Support from chip vendors?

I know that ARM actually has some support for Java and SUN obviously, but I haven't really references seen any chip vendor supporting a .Net JIT compiler. I know IBM and Intel both support C compilers, as well as TI and many of the embedded chip vendors. When you think of it, all a JIT compiler is, is the last stages of compilation and...