Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cpu]

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

1
vote
3answers
155 views

Comparison of build times on various hardware; why non-linear results?

Why do the compile times not vary significantly between different era CPUs, even though disk (NVMe vs. HDD) and CPU benchmarks vary significantly in performance? Why does disabling hyperthreading ...
0
votes
2answers
97 views

How did old OSs create or expand a segment in memory without issues?

On an 8086 CPU before the flat memory model had been adopted, when the OS wanted to create a new segment for a process, how did it know what virtual memory ranges were already covered by existing ...
3
votes
3answers
552 views

How to align on both word size and cache lines in x86

From what it sounds like, a 64 bit processor means aligning to 64 bits, which means if you have unicode utf-8 stored in there, each 8-bit chunk would take up 64 bits of space. That doesn't really make ...
-6
votes
1answer
64 views

two processes with same execute time [closed]

Process A take 10 seconds to finish an execution. Process B take 10 seconds to finish an execution. Is it possible to take 5, 8, 15 seconds to finish an execeution if they run stimulately.
0
votes
2answers
2k views

What is more efficient: Reading and parsing a large JSON file, or large CSV file?

I plan on using Scrapy to crawl a local website for a LOT of data and store it in a file. Then I plan to parse that file and put some of the data in a SQL database. Will my computer use less CPU and ...
0
votes
4answers
219 views

Does instruction length affect cycles per instruction?

ISAs define things like instruction lengths and the instructions themselves and there are some things that I do not understand. Does the instruction length (the amount of bits) affect the amount of ...
3
votes
1answer
184 views

What receives the output of the ALU?

I know that the Arithmetic Logic Unit (ALU of a processor performs arithmetic (and bitwise) operations and the result is stored as the ALU's output - but what component, device or software is actually ...
3
votes
2answers
968 views

How does a CPU load multiple bytes at once if memory is byte addressed?

I've been reading about CPUs and how they are implemented, and some big complex architectures (looking at you x86) have instructions that load from memory during one clock cycle. Since one address ...
1
vote
2answers
319 views

Increase processing use of Digital Signal Processor

I have a DSP (Digital Signal Processor) with a very well defined application, (this explication will be simplified) The DSP uses TDM (Time Division Multiplexer) frames to receive audio information, ...
5
votes
3answers
2k views

What does “address space” means when talking about IO devices?

The following quote is from this page: While some CPU manufacturers implement a single address space in their chips, others decided that peripheral devices are different from memory and, ...
2
votes
1answer
170 views

What does “data bus control” mean?

This video mentions the following: What does it mean for the DMA controller to be granted the data bus control, does that mean the CPU cannot use the bus to access memory and IO devices until the DMA ...
4
votes
3answers
342 views

What happens to multiple parallel tasks running on a server when CPU hits 100% usage?

I am running 10 instances of the same executable where each executable is accessing a different 1/10 chunk of the total data that needs to be processed on a Windows Server 2012 R2. (Intel(R) Xeon(R) 2....
-5
votes
1answer
613 views

Feature of CPU needed to run Javascript fast

This is more of a Computer Engineering question, but what is the feature of a CPU to run Javascript fast? I use to access the internet with an AMD Phenom II with 6 cores and I could almost have as ...
58
votes
3answers
27k 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,...
2
votes
2answers
138 views

Why are CPUs' datapaths mutiple of 8?

Current and common processing units are 8, 16, 32, 64, 128, etc bit. Why are their datapath multiple of 8 ? Is this all linked to the fact that the industry has settled with a 8-bit byte ? The PDP-7 ...
6
votes
2answers
4k 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
2answers
2k 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 ...
10
votes
3answers
645 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 ...
2
votes
4answers
7k 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
2answers
233 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 ...
2
votes
4answers
275 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
3answers
381 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
2answers
513 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
1answer
281 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
4answers
555 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 ...
3
votes
3answers
2k 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
2answers
112 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
2answers
207 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
1answer
222 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?
8
votes
2answers
2k 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() ...
-2
votes
3answers
408 views

Is it possible and faster to run an application on an unused CPU core?

Is it possible to move an application (or task) to another core to make it run faster and get all of that cores processing power? The way I understand it is that in an operating system applications ...
43
votes
7answers
8k 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 ...
2
votes
4answers
3k views

Byte addressable vs bit addressable

Why are most computers byte addressable instead of bit addressable? By B/b addressable I mean that processor can operate on level of single B/b. Bit addressable advantages: Booleans have size of ...
1
vote
3answers
1k views

Operation excution in terms of clock cycles

Typically for a single instrcution, 6 machine cycles are needed: FETCH instruction DECODE instruction EVALUATE ADDRESS fetch OPERANDS EXECUTE oepration STORE result My concern is regarding the fifth ...
1
vote
1answer
162 views

What was the first mass-produced CPU to have an instruction for multiplication?

The CPU I am most familiar with is the Z80 which was first released in 1976. The most complicated mathematical single instructions it has are integer ADD, SUB and closely related instructions, such as ...
9
votes
3answers
522 views

Are there CPUs that perform this possible L1 cache write optimization?

When the CPU with an L1 cache does a write, what normally happens is that (assuming that the cache line that it is writing to is already in the L1 cache) the cache (in addition to updating the data) ...
2
votes
0answers
83 views

Handling exceptions in multiple-issue CPUs

From what I read, VLIWs execute instructions in bundles, i.e. the CPU loads a bundle of instructions and dispatches them all at once. This is possible because the compiler scheduled instructions in ...
1
vote
2answers
124 views

What could “move an instruction without a 16-bit bus” mean?

Spoiler alert! This question (and, possibly, answers) could contain spoilers regarding "Halt and Catch Fire" TV series. Background I'm a web deleloper and do not have a CS degreee, so my ...
64
votes
3answers
27k 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 ...
0
votes
0answers
72 views

Cost of cache coherency/sharing data across multiple cores?

If I have two CPU cores, one is writing a particular cache line and the other core wishes to Read Write the same cache line, what are the costs (in cycles) for doing so? I am a little unsure ...
27
votes
6answers
17k 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 ...
1
vote
3answers
198 views

Pre-calculate values or not on Raspberry Pi

Say that you want to rotate something 360 steps 100 times. You now have a choise to pre-calculate 360 sin and cos values once and then use the stored values 100 times, or you can calculate sin and cos ...
5
votes
2answers
4k views

What is a latency-bound and a memory-bound application in HPC?

I understand that in HPC hybrid systems, for instance a MIC architecture, main memory access is much slower than access to data in own cache or in the cache of another core. I read that HPC MIC ...
1
vote
1answer
403 views

Relationship of common MCUs/CPUs to FPGA and ASIC

I'm trying to understand the relationship between "common" MCUs/CPUs such as Intel, AMD, PowerPC, AVR, ARM, etc. and FPGAs and ASICs. Here is my understanding: These commons MCUs/CPUs (again, Intel, ...
2
votes
2answers
817 views

Compiling and deploying a C program to an MCU running an RTOS

Please note: Even though I'm specifically talking about an RTOS called Embox here, and even though I'm talking about AVR/ARm, I think this question can be answered by anybody whose ever done a fair ...
2
votes
1answer
169 views

Compiling and deploying RTOS to an MCU

Please note: Even though I'm specifically talking about an RTOS called Embox here, and even though I'm talking about AVR/ARm, I think this question can be answered by anybody whose ever done a fair ...
2
votes
1answer
2k views

How does a program talk to a graphics card?

I have heard that GPU's are better at performing certain tasks than a CPU. My question is, how does a program tell a graphics card to process something instead of the CPU? Does the program talk to the ...
3
votes
1answer
564 views

Translation Lookaside buffer - Lookup By Page Size

I am having a hard time finding documentation that explains precisely how the various TLB caches are used in modern processors. Most modern processors have separate TLBs for code/data. That in itself ...
1
vote
0answers
414 views

What parallelism happens in a vector processor?

From Tanebaum's Structured Computer Organization A vector processor is very efficient at executing a sequence of operations on pairs of data elements. All of the operations are performed in a ...
1
vote
2answers
850 views

What does “issue or start an instruction” mean?

From Section 2.1.3 RISC vs CISC from Structured Computer Organization by Tanenbaum, While the initial emphasis was on simple instructions that could be executed quickly, it was soon realized ...