Questions tagged [cpu]
CPU, stands for Central Processing Unit. It is responsible for carrying out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output (I/O) operations specified by the instructions.
303
questions
1
vote
1
answer
28
views
How CPU uses wider address bus than register size?
i'm designing a CPU from scratch so i want it to be small. i decided to go with 4 bits registers. but 16 words of memory is a bit too small and i want more so i guess i need wider address bus (ie. 6). ...
1
vote
1
answer
16
views
Memory addresses requested by CPU vs Memory Address Provided to DRAM
So, i just got through studying DRAM architecture. I learned that a row address, column address, bank number etc are provided to the DRAM during a read operation. Based on the address provided, 64 ...
0
votes
0
answers
16
views
Step in RISC-V program on a Pipelined Processor
I struggle to understand a step in the following solution to a RISC-V exercise.
Exercise: a pipelined RISC-V processor with no data forwarding paths executes the following program. For each ...
0
votes
2
answers
41
views
When a CPU copies instructions from storage into RAM how does it jump to instructions no longer in RAM?
When a CPU needs to get more instructions from storage and copies them to RAM, how does the CPU jump to previous instructions that are no longer in the RAM? Would it have to copy the old instructions ...
0
votes
1
answer
19
views
Cache Miss in First Private Cache but Hit in Shared LEvel 2 Cache: Does it Result in a Penalty?
In the context of Shared Memory Multiprocessor (SMP) systems with different cache levels, if a cache miss occurs in the first private cache but is followed by a hit in the second shared cache, would ...
1
vote
1
answer
51
views
Has there been a processor architecture that included commands that move arrays of data in the memory with one opcode?
In traditional processors one move operation can at most move one word between memory locations and optionally increment or decrement the registers which point to those memory locations. In x86 ...
0
votes
2
answers
68
views
Why does Elbrus use VLIW architecture?
I find the Russian Elbrus CPU fascinating.
It seems that it is fairly decent at performing calculations, and security. This is likely as it is heavily specific for military and financial industries, ...
10
votes
7
answers
6k
views
Mathematical benefit to use CPU/memory that increases by powers of 2 as 8-bit, 16-bit, 32-bit, 64-bit, etc?
Historically, processors often increase in bit-size by powers of 2, such as 8-bit, then 16-bit, 32-bit, 64-bit. Although this has not always been the case, it is a well known trend. One benefit is ...
0
votes
2
answers
66
views
Why aren't all smaller components of 64-bit registers accessible and readily usable?
A register in a CPU can be much more well utilized if it could be divided and its parts can be used independently. For example, if you need 8 8-bit values, you could just use a single 64-bit register, ...
0
votes
1
answer
65
views
How to find optimum number of cpu cores for a workload
Following bar graph shows maximum percentage cpu utilization of F16sv2 (16vcpu &32GB) azure virtual machine in last 30 days. Only sometimes CPU usage goes more than 60 percentage.
How to find the ...
0
votes
1
answer
38
views
What is the reason or advantage of having special purpose status flags for the result of comparisons? [duplicate]
The C semantics treat the result of a comparison or any true/false operation as just an int ...
0
votes
1
answer
64
views
Roles of 80386 MMU Paging Unit and similarity with modern CPU MMU
While searching for the structure of the MMU, I found the image below (80386 Internal Architecture).
I have three questions.
Q1. I'd like to know the roles of 'Adder', 'Page Cache', and 'Control and ...
0
votes
1
answer
52
views
How does the program counter "know" when the fetch cycle is complete?
So my understanding of updating the PC is as follows:
Put memory address indicated by PC into memory address register
Load the contents of the address pointed to by memory address register into ...
0
votes
3
answers
120
views
Logical address vs physical address
I have been trying to understand the logical and physical address of some data/instruction the logical address is a address generated by the CPU during a execution cycle.So if I write
this code
...
0
votes
0
answers
35
views
Neural networks as building blocks of a computer
I think I have developed a logic circuit which by using combinational logic and flip flops learns to perform the XNOR logic between 2 bits.It is a kind of state machine. Suppose we built a computer ...
1
vote
1
answer
100
views
Why is handling word sizes smaller than the native size of a processor sometimes slower?
For example on modern (32-64 bit CPUs), some sources say that manipulating a 32-bit or 64-bit integer will actually be faster than manipulating an 8-bit or 16-bit integer. This the reason for the <...
0
votes
1
answer
45
views
Understanding the Relationship Between CPU Registers Amounts and Maximum RAM in 32-bit Architectures
To my knowledge,
The number of CPU registers can tell us the maximum RAM we can have. I am only talking about physical memory, no virtual memory or virtualization in my question.
A 32-bit CPU ...
0
votes
1
answer
97
views
Sequence counter in a hardwired control unit
I have been studying the structure of a hardwired control unit and at 8:57 of this video
we get a basic block diagram.What does the sequence counter do exactly?
1
vote
2
answers
52
views
Can a branch be pipelined with certainty if the branch condition can be known significantly before the actual branch?
A common issue with CPU performance is that pipelining requires the knowledge of what will come next, and what comes next can only be known once a branch condition is evaluated, so that instructions ...
0
votes
1
answer
66
views
RISC-V execution model
I'm reading a text book on CPU architecture and I have something that confuses me: The text book defines 4 different instruction execution models in CPUs, Stack (where a CPU only has a stack and is ...
0
votes
0
answers
25
views
Why do these 8 bit registers use 16 I/O wires for input and output to the bus? Why not use 8 wires for both input and output?
I'm looking at this diagram from Ben Eater's "8 bit computer" tutorial
What's the need to use separate 8 wires for only data input, and another 8 wires only for data output?
Why not use only ...
0
votes
0
answers
17
views
Logical circuit for priority resolution in interrupt controllers (with configurable priority, not fixed)
I'm interested in what the typical solution is for priority resolution in interrupt controllers. I assume a hardware logic circuit is used, and not software. For interrupt controllers with fixed ...
0
votes
1
answer
87
views
Are edge-triggered interrupts "hardware polled"?
Thanks in advance for assistance and patience with my hardware naivety
Reading the below answer about the NMI on pin 6 for an Apple 6502, and the signal on the pin falls from high to low, how does ...
0
votes
0
answers
37
views
What does the CPU do in AI model training?
I'm new to computing and even newer still to AI model training. However I am wondering the role of the CPU during training of LLM. I'm aware that the CPUs are good for performing strings of ...
1
vote
1
answer
85
views
Is a CPU with a hybrid Instruction Set Architecture (ISA) possible?
Is it possible to (theoretically) develop a CPU having a hybrid ISA such that half of the cores in it use the x86 architecture and the other half uses the ARM architecture? The x86 cores would run the ...
-2
votes
2
answers
163
views
Are there any radical approaches in CPU development?
I have a desktop PC with the CPU Intel I7-12700F with 180 TDP, the CPU fan Zalman CNPS10X extreme, and Windows 11 and my problem is that The CPU cooling causes much noise when simple tasks are being ...
0
votes
0
answers
91
views
How do you determine the amount of bits for the tag, index, and offset in a MIPS byte-addressed direct-mapped cache when given only a list of address?
The question I'm working on is as follows:
I'm still kind of working on how direct-mapped caches work in my computer organization class.
I sort of understand that you need the least significant 2 ...
0
votes
1
answer
75
views
Can a CPU instruction be split into 2 inputs?
Let's say there was a CPU with an input bus of 4 bits and the 4 bits are the opcode then the next 4 bits are the operand. It would just be an 8-bit instruction split in two. Is this possible and how ...
0
votes
2
answers
128
views
How does a CPU jump to a instruction thats no longer in ram?
Im designing my own CPU but I don't know how it jumps to an instruction that's no longer in ram. People have told me it puts the address in the SSD but for example, if the address were 3 in ram it ...
0
votes
1
answer
207
views
I Don't Understand Nothing About Operating Systems even After reading books
I'm a programmer, let's start by that. The question may sound really broad, and in fact it is. I'll list some things that I know, and some other things I've doubts about under the form of questions.
...
0
votes
0
answers
77
views
DMA mode: burst or cycle stealing -- how to know and set? What is blocked?
What component and mechanism determines which DMA transfer mode is used?
How can be identified what DMA mode is used by a device, let's say on Linux?
Let's consider a contemporary AMD or Intel x86-64 ...
0
votes
0
answers
40
views
Dependency in pipeline
Assume the pipeline is initially empty and the processor is given 8 instructions to execute. However, the 4th instruction is an instruction whose operands depend on the result of the previous ...
0
votes
0
answers
68
views
Is the control bus bidirectional
In one place, I read that the only bidirectional bus is the data bus, but I saw elswhere that the control bus is also. Which is correct?
-2
votes
1
answer
65
views
How a computer works?
I know that a computer can be mechanical, screws/nuts or even water/pipes. Of course, it would be slow and big, but it doesn't have to be electric, transistors, etc. How can a machine like this do all ...
0
votes
0
answers
39
views
A question about cpu utilization
Here's a question in the OS textbook about calculating the cpu utilization.
I've tried to write down the (A) by myself as below.
...
1
vote
0
answers
55
views
Can compilers improve performance in real workloads by inserting prefetches in their output?
Prefetching is a task that the compiler feels like it should be suited for. Prefetching requires knowing in advance what data the program is about to load, and the compiler has a ton of information at ...
4
votes
2
answers
740
views
How efficient is register renaming?
As I understand, all modern CPUs perform register renaming: given a sequence of instructions to interpret, they check which registers these instructions use, detect patterns where a register's ...
1
vote
3
answers
101
views
Is this how endianess work relative to memory?
So I've been trying to understand endianess for the past couple of days but I'm not sure if I'm overthinking this or not and I don't have anyone I can ask to confirm things.
Here is how I look at ...
0
votes
1
answer
57
views
How are setup and hold and timing constraints handled when reading an address from memory?
When an operand encodes an address, and that address changes the "memory address register" and the word in memory being addressed, it seems like timing issues could be a problem. Examples, ...
1
vote
4
answers
208
views
Is the reason for a stack to decrease the size of a program (by adding the use of subroutines)?
The stack allows subroutines to be used. It can store return address for "return from subroutine" instruction (RTN) and also arguments for the function.
It is not possible to store return ...
0
votes
2
answers
124
views
Are variables stored again in RAM?
Assuming this set of instructions:
declare variable 'A' which has value 5
declare variable 'B' which has value 2
From what I've understood, those instructions are loaded into RAM an then read by CPU,...
0
votes
2
answers
80
views
What is the most critical component of a processor? [closed]
We know that there are basically 3 fundamental parts of a processor namely :
Control Unit (CU)
Arithmetical Logic Unit (ALU)
Clock
Also we know that they maintain several important and different ...
0
votes
4
answers
104
views
I need to test the speed of performing arithmetic operations on binary numbers
As part of a college project, I need to compare the speed of arithmetic operations directly in binary on different processors.
Example:
At what speed will binary addition be performed on an Intel Core ...
0
votes
2
answers
297
views
If a process needs more RAM, does the Page size simply get bigger or does it get a new page?
Let's say I have a Operating System with 4KB page size, but I need to allocate 8kb of memory for all the variables. Does the Process get new page (second one) or does the current page table simply get ...
1
vote
2
answers
177
views
What happens in harvard architecture pipelining if cpu needs to write data and fetch data at the same time?
What happens if Operand Fetch and Write Back happen in same cycle?
1
vote
1
answer
897
views
How are processor instructions stored in RAM?
I've recently been designing a simple 8-bit microprocessor, similar to the Intel 8008. It doesn't make use of anything advanced as pipelining, as my knowledge isn't at that level yet to know how to ...
0
votes
1
answer
1k
views
How does instruction set architecture affects clock rate?
According to the computer organization and design RISC-V 2nd edition 2020, section 1.5, the following table states that ISA affects clock rate.
Hardware or software component
Affects what?
How?
...
16
votes
4
answers
13k
views
What is a CPU clock physically?
I can't seem to get a straight answer as to what a CPU clock is.
I know there are quartz crystal clocks that work by the bending of quartz that happens as an electrical current is passed through it. ...
1
vote
1
answer
120
views
Are really only ~1% of the physical CPU space used for computing
In a Talk by Herb Sutter C++ and Beyond 2012: Herb Sutter - atomic Weapons 1 of 2 at 46:30 the point is made that only around 15% of the physical space (or the transistors) on a CPU do actual ...
3
votes
1
answer
816
views
"Hack computer" from Nand2Tetris registers, any real world examples of similar design?
The "Hack CPU" (Wikipedia/Hack_computer) is a theoretical computer design created by Noam Nisan and Shimon Schocken and described in their book and also used in their Coursera course ...