Questions tagged [cpu]
CPU is the abbreviation for central processing unit. Sometimes referred to simply as the central processor, but more commonly called processor
123
questions
9
votes
2
answers
9k
views
Separate Thread Pools for I/O and CPU Tasks
I've been puzzling over a good implementation for this for a while. I have a program that does a long-running I/O operation (downloading a file) and a long-running CPU operation (parsing its contents)...
1
vote
2
answers
8k
views
How to maximize the CPU usage of a Python subprocess?
I have a Python script launching a C++ executable.
The C++ executable is a multithreaded program that usually takes several hours to run. The way the C++ code is written, it will run on all the ...
12
votes
3
answers
2k
views
Why do compilers typically only generate executables for the platform they are installed on?
I'm a C++ developer and in an attempt to better understand cross-platform development, I'm trying to get a better understanding of some implementation details of compilers and how exactly they create ...
3
votes
4
answers
20k
views
The difference between accumulator-based and register-based CPU architecture?
I don't understand the difference between an accumulator-based CPU architecture and a register-based CPU architecture. I know x86 is register-based but it has an accumulator-like register. I only ever ...
0
votes
2
answers
2k
views
How to calculate how much of the CPU is used?
Say we have an interrupt that is generated once each time that 1024 bytes of network traffic arrives. Each interrupt takes 3.5 microseconds to process and the network speed is 100Mb.We want the ...
3
votes
4
answers
676
views
Is it possible for a computer system to have constant/zero CPU load?
For example, a simple program in a simulated environment that waits for user input seems to be doing no work, so I guess it uses CPU only for the time.
I'd like to know if computer systems (that don'...
1
vote
3
answers
2k
views
Why can less precise data like float be faster than larger, more precise data like double?
I am currently reading a chapter in a textbook on Processor Architecture and saw the following statement:
The less precision there is, the less space is occupied by a program variable in memory. ...
-6
votes
2
answers
2k
views
How does the web application support 150 max threads when the cpu only supports 2? [duplicate]
doing an lscpu cmd this is what i get
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: ...
0
votes
1
answer
384
views
How is the data path controlled between ALU and registers?
On some machines the operation of data path between ALU and registers is controlled by microprogram . On some machines , it is controlled by
hardware .On machines with software control of the data ...
0
votes
4
answers
1k
views
When it is worth it to spend RAM for computational speed? [closed]
I am developing data analytics algorithms that are supposed to process large amounts of data.
Thus I am aiming to develop my mathematics already in such a way that it is possible to distribute the ...
2
votes
3
answers
3k
views
Source of loading value to the register or memory location
When we load a register or memory location with a value (e.g. MVI 3A or MVI 53), what initializes register or memory location with that specific value? It is the CPU who performs the initialization, ...
0
votes
2
answers
123
views
How to wait for a certain amount of time if time functions are not reliable [closed]
How can I manage my code to exactly wait for a certain amount of time (say 10s), if all * time functions on the system are not reliable and return immediately ?
Sleep(10000); // Do not sleep for 10s ...
1
vote
2
answers
724
views
How can an interpreter produce output of some code, without having the computing components like ALU of a processor?
I have gone through lot of explanations about a compiler and interpreter. I think I understood the difference between compiler and interpreter clearly. I'll explain my learning through the following ...
0
votes
1
answer
322
views
Is CPU only task executer in microprocessor?
I was wondering if are all tasks executed by the CPU (fetching, reading, writing, etc.)? Everything is controlled, manipulated or executed by the CPU?
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() ...