Questions tagged [cpu]

The central processing unit or "processor" inside a computer which executes the instructions in a computer program.

The central processing unit (CPU) is the portion of a computer system that carries out the instructions of a computer program, and is the primary element carrying out the computer's functions. The central processing unit carries out each instruction of the program in sequence, to perform the basic arithmetical, logical, and input/output operations of the system. This term has been in use in the computer industry at least since the early 1960s. The form, design and implementation of CPUs have changed dramatically since the earliest examples, but their fundamental operation remains much the same.

Source: Wikipedia

4662 questions
2
votes
2 answers

Designate specific CPU for a process - python multiprocessing

I am using Redis as my queue for a producer/consumer relationship in a multiprocessing setup. My problem is that my producers are overloading my consumer then stealing it's CPU. My question, can I allocate an entire processor to specific…
ccdpowell
  • 629
  • 5
  • 14
  • 22
2
votes
2 answers

Converting C to MIPS

I am writing a program in MIPS but cannot wrap my head around writing the following statement below. How do I write a logical statement like this in MIPS instruction set? return a > b ? a : b;
Barney Chambers
  • 2,720
  • 6
  • 42
  • 78
2
votes
1 answer

How many stack areas are there in memory?

Might sound like a silly question but I just wondered how many different stack areas there are in memory with say 4 CPU cores (if this really depends on the number of CPUs at all)? To my knowledge at some point during boot before the execution of…
JohnnyFromBF
  • 9,873
  • 10
  • 45
  • 59
2
votes
2 answers

Multi-thread process on multi-core or single-core double the speed?

Assume I have a process that consists of two ideally independent tasks (ideally, to remove the communication overhead). Would it be faster to do it on a single-core processor of 3GHz speed or two-core processor of 1.5GHz speed? Of course, in case of…
2
votes
2 answers

Multi-thread code with single-core processor and single-thread code with multi-core processor

I'm new to multi-threaded programming. I have been reading some articles, but two main points I'm not completely sure about. If I have a single-thread code (sequential), and I run it on multi-core processor. Will the OS try to divide the thread…
2
votes
2 answers

Why do I get memory errors from my Delphi 2006 app running under Windows XP embedded

I have a D2006 app that uses FastMM4 (like, it has "FastMM4" in the start of the uses clause in the DPR file). I know Delphi uses FastMM4 as it's memory manager anyway, but the downloaded version has more debug dump options. I recently tried to run…
rossmcm
  • 5,493
  • 10
  • 55
  • 118
2
votes
0 answers

Intel cache miss/hit events

I'm looking to calculate cache miss/hit rates for some applications using Intel CPU event counters found here https://software.intel.com/en-us/node/589938 My question is why can I find cache events only for memory LOAD retired operations and not for…
user1934513
  • 693
  • 4
  • 21
2
votes
3 answers

onTextChanged event doesn't work in Android

I have an EditBox and a TextView in an application. I want the TextView to convert numbers that I type into the EditBox to words as I'm typing ( onTextChanged() ) and show it. I made the class for converting numbers to words and it works…
A. Hajeb
  • 37
  • 1
  • 11
2
votes
1 answer

x86/64 vs ARM cache miss/branch mispredict penalty

Is there any significant or fundamental difference between the penalty of cache misses and branch mispredictions for ARM and x86/64 processors? I understand that mileage may vary depending on concrete model and whole configuration of a machine. But…
rotanov
  • 87
  • 7
2
votes
0 answers

Get CPU usage for specific process for sandbox enabled MAS App (Objective C- Xcode)

I 'm working on a Mac App (Objective C) which I wanna distribute over the Mac App Store. I'm using NSWorkspace to get all running applications. What I want is to get the CPU usage % for each process identifier of all running applications. Now I'm…
steve1ae
  • 91
  • 4
2
votes
2 answers

How to measure JavaScript performance (aside from page load time)

There seem to be a lot of tools to check how much time it takes to load a specific script, but what about performance impact on the user's machine? Does anyone know of any tools to see the CPU demands of a specific script, especially on mobile? As I…
ibhhvc
  • 255
  • 2
  • 12
2
votes
1 answer

What is MIPS and what is it used for?

Without further explanation of why I want to know this, what exactly is MIPS? What's the use of an assembly language for us when we have easier to learn and understand programming languages (C++, java, python.. etc)? I've been told in university…
user5103849
2
votes
2 answers

How can CPU utilization be between 0 and 100 percent

Please forgive my ignorance on such topics, but I was wondering a CPU has instruction pointer (IP) and so can either be using that IP or not use it (IDLE).. So CPU utilization can be either 0(assuming idle task is doing nothing or just while(1)) or…
2
votes
0 answers

The process of program execution and how virtual addresses are handled

I've been studying C++ for a while now and I'm curious about two things: 1.) When exactly are the virtual addresses generated for the program? Are most or all done at compile time or runtime? or does it depend? 2.) Once virtual addresses are…
Jason
  • 2,198
  • 3
  • 23
  • 59
2
votes
1 answer

Time spends in CPU faster than in reality

I am wondering why my entire application runs in less than 8 seconds while the time obtained from clock_gettime is 19.3468 seconds which is more than two times as much as what happens in reality. Where is the problem…
ar2015
  • 5,558
  • 8
  • 53
  • 110