Skip to main content

Questions tagged [cpu]

CPU is the abbreviation for central processing unit. Sometimes referred to simply as the central processor, but more commonly called processor

73 votes
3 answers
65k views

How does a single thread run on multiple cores?

I am trying to understand, at a high-level, how single threads run across multiple cores. Below is my best understanding. I do not believe it is correct though. Based on my reading of Hyper-threading,...
Evorlor's user avatar
  • 1,550
70 votes
3 answers
55k views

Which programming language is used to write a BIOS program?

As I understand, the BIOS code/bitstream that is held in the ROM should be generic (work alongside with multiple CPU types or ISAs). In addition, I saw mentioned on the web that it is possible to dump ...
Reflection's user avatar
65 votes
7 answers
15k views

Is a 1 < 10 comparison less expensive than 1 < 1000000?

I just used ~1 billion as the count for a z-index in CSS, and was thinking about the comparisons that must go on. Is there a difference in performance on the ALU level in comparisons between very ...
J.Todd's user avatar
  • 3,823
62 votes
10 answers
25k views

Does it ever make sense to use more concurrent processes than processor cores?

I've got some process in Go. Here's an example counting lines in text, though the question is meant to be far more general than this particular example: func lineCount(s string) int { count := 0 ...
TheEnvironmentalist's user avatar
55 votes
12 answers
10k views

Why would a program require a specific minimum number of CPU cores?

Is it possible to write code (or complete software, rather than a piece of code) that won't work properly when run on a CPU that has less than N number of cores? Without checking it explicitly and ...
uylmz's user avatar
  • 1,139
43 votes
10 answers
28k views

Why should your code not use 100% CPU? [closed]

I'm speaking specifically about a C# .NET 4 program running on Windows XP or higher, but general answers are also acceptable. Assume an already optimized and efficient program. The problem here is ...
Nick Udell's user avatar
  • 1,204
43 votes
7 answers
10k views

In software programming, would it be possible to have both CPU and GPU loads at 100%?

This is a general question on a subject I've found interesting as a gamer: CPU/GPU bottlenecks and programming. If I'm not mistaken, I've come to understand that both CPU and GPU calculate stuff, but ...
Azami's user avatar
  • 549
41 votes
3 answers
28k views

Why does the stack grow downward?

I'm assuming there's a history to it, but why does the stack grow downward? It seems to me like buffer overflows would be a lot harder to exploit if the stack grew upward...
user541686's user avatar
  • 8,112
33 votes
7 answers
8k views

Why do modern operating systems *ever* have perceptible input (keyboard/mouse) lag?

Sometimes computers stutter a bit when they're working hard, to the point where the mouse location freezes for a fraction of a second, or stutters intermittently for a few seconds. This sometimes ...
Paul Calcraft's user avatar
32 votes
4 answers
42k views

What are CPU registers?

This question has been bothering me for some time now and today I figured I would Google it. I've read some stuff about it and it seemed very similar to what I've always known as processor cache. Is ...
Jeroen's user avatar
  • 613
32 votes
1 answer
1k views

Performance of single-assignment ADT oriented code on modern CPUs

Working in immutable data with single assignments has the obvious effect of requiring more memory, one would presume, because you're constantly creating new values (though compilers under the covers ...
Jimmy Hoffa's user avatar
  • 16.1k
31 votes
6 answers
26k views

Why do we have to wait for I/O?

It's always been known that Disk operations are slow and we know the reasons why they are slow. So the question here is why do we have to wait for I/O or why is there such a thing as IOWait, etc.? I ...
Arturas M's user avatar
  • 571
29 votes
2 answers
11k views

How does sleeping a thread work?

When you sleep a thread, what is actually going on? I see that sleeping a thread "pauses the current thread for a given period of time". But just how does it work? According to How Thread.sleep() ...
Rowan Freeman's user avatar
26 votes
3 answers
25k views

Why are there separate L1 caches for data and instructions?

Just went over some slides and noticed that the L1 cache (at least on Intel CPUs) distinguishes between data and instruction cache, I would like to know why this is..
Nils's user avatar
  • 556
26 votes
6 answers
17k views

How often do CPUs make calculation errors?

In Dijkstra's Notes on Structured Programming he talks a lot about the provability of computer programs as abstract entities. As a corollary, he remarks how testing isn't enough. E.g., he points out ...
veryfoolish's user avatar

15 30 50 per page
1
2 3 4 5
9