Questions tagged [cpu-architecture]
The hardware microarchitecture (x86, x86_64, ARM, ...) of a CPU or microcontroller.
-2
votes
0answers
12 views
Microprocessor Cache acces time
A cache is having 60% hit ratio for read operation. Cache access time is 30 ns and main memory access time is 100 ns, 50% operations are read operation.
What will be the average access time for read ...
1
vote
1answer
26 views
which component manages or provides instructions to the control unit in a processor?
I am newbie to computer architecture and I have the following questions,
Which unit or component controls operations such as incrementing program counter, loading the instruction to the IR and the ...
2
votes
2answers
44 views
Why branch delay slot is deprecated or obsolete?
When I reading RISC-V User-Level ISA manual,I noticed that it said that "OpenRISC has condition codes and branch delay slots, which complicate higher performance implementations." so RISC-V don't have ...
0
votes
1answer
24 views
how can I determine the decimal value of a 32bit word containing 4 hexadecimal values?
Suppose Byte 0 in RAM contains the value 0x12. Subsequent bytes contain 0x34, 0x45, and 0x78. On a Big-Endian system with a 32-bit word, what’s the decimal value of the word?
I know that for a Big ...
1
vote
1answer
62 views
solution to rdtsc out of order execution?
I am trying to replace clock_gettime(CLOCK_REALTIME, &ts) with rdtsc to benchmark code execution time in terms of cpu cycles rather than server time. The execution time of the bench-marking code ...
0
votes
2answers
59 views
Does the NT Kernel not utilise Multiple Memory Channel Architecture?
I've been reading benchmarks that test the benefits of systems with Multiple Memory Channel Architectures. The general conclusion of most of these benchmarks is that the performance benefits of ...
4
votes
1answer
70 views
How do data caches route the object in this example?
Consider the diagrammed data cache architecture. (ASCII art follows.)
--------------------------------------
| CPU core A | CPU core B | |
|------------|------------| Devices |
| ...
2
votes
2answers
87 views
Hit / Miss rate counting by array caching
I'm reading Computer Systems book from Bryant & O'Hallaron, there is an exercises the solution of which seems to be incorrect. So I'd like to make it sure
given
struct point {
int x;
int y;...
1
vote
0answers
64 views
Calculate execution time of different operating systems [closed]
I am an undergraduate student learning about Operating Systems, and have a strange computational assignment to appreciate the history of Operating Systems.
Question 1
[ Batch OS ]
Questions 1 and 2 ...
0
votes
1answer
20 views
How is computer with FPU classified in Flynn's taxonomy?
How is computer with FPU classified in Flynn's taxonomy? If machine has a CPU with single core, but also has FPU, is that SISD or SIMD?
0
votes
1answer
20 views
For a arithmetic operation computer can use binary code or direct binary equivalent of a number or both?
For example BCD code of decimal number 395 is 001110010101 and direct binary conversion is 110001011,
Which one value computer can use for arithmetic operations
1
vote
3answers
95 views
Is it more efficient to touch fewer registers in ARM assembly?
I've just started learning Assembly via Raspbian and have a quick question: how efficient is saving register space in Assembly? For example, if I wanted to do a quick addition, is there a meaningful ...
5
votes
3answers
109 views
The inner workings of Spectre (v2)
I have done some reading about Spectre v2 and obviously you get the non technical explanations. Peter Cordes has a more in-depth explanation but it doesn't fully address a few details. Note: I have ...
0
votes
1answer
62 views
How to ensure an application will be compliant with 64 bit?
Important links:
https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html
https://developer.android.com/distribute/best-practices/develop/64-bit#assess_your_app
As you ...
7
votes
2answers
113 views
How can x86 bsr/bsf have fixed latency, not data dependent? Doesn't it loop over bits like the pseudocode shows?
I am on the hook to analyze some "timing channels" of some x86 binary code. I am posting one question to comprehend the bsf/bsr opcodes.
So high-levelly, these two opcodes can be modeled as a "loop", ...
-1
votes
3answers
99 views
Compute the average load time
A computer has a cache, main memory and a hard disk. If a referenced
word is in the cache, it takes 15 ns to access it. If it is in main memory
but not in the cache, it takes 85 ns to load (the block ...
-1
votes
0answers
51 views
Calculating Cache Index, Tag, Offset, and Misses
I need help solving an example on direct-mapped caching.
I have an empty, direct-mapped cache with 2-word lines and 32 byte capacity. I need to create a table outlining the cache tag, index, offset, ...
1
vote
1answer
26 views
Process.GetProcesses and IsWow64Process does not return all the running processes
Im using this simple code to list all the running processes and their architecture (32bit or 64bit) on console, And it works nearly accurate but the number of processes in result is not even half of ...
1
vote
0answers
12 views
Multicore simulation in gem5 simulator: How it works
I want to simulate multicore simulation in gem5. where each program running in each core. For that I use following command with an expectation that different program running in different threads in ...
3
votes
2answers
59 views
How are branch mispredictions handled before a hardware interrupt
A hardware interrupt occurs to a particular vector (not masked), CPU checks IF flag and pushes RFLAGS, CS and RIP to the stack, meanwhile there are still instructions completing in the back end, one ...
2
votes
2answers
73 views
Understanding 4K aliasing on Intel CPU's
I've been reading about 4K aliasing caused by load/store overlaps due to ambiguity in address bits 6 to 11 on Intel CPU's. So I am trying to write various simple tests (on a i7-3770k, Win7, 64bit, ...
0
votes
1answer
43 views
Can a single core do multiple compare/add operations at once?
I want to know if a CPU core can do multiple x86 comparison and add operations at once in parallel.
So if I wrote something like
Compare X y
Compare y z
Add X y
Add q p
Would the compares run at ...
1
vote
1answer
71 views
Why is it better to use the ebp than the esp register to locate parameters on the stack?
I am new to MASM. I have confusion regarding these pointer registers. I would really appreciate if you guys help me.
Thanks
0
votes
0answers
44 views
assembly language conversion of program from hexa decimal to decimal with scoring for loop
A hexadecimal number provided by user for 5 times in loop should be converted into to Decimal number, This should provide us with display the correct answer incase the input provided is wrong and ...
0
votes
0answers
13 views
Does Semaphore guarantees visibility among threads? [duplicate]
Will the changes to shared memory between sem_wait and sem_post in one thread be visible in other threads?
4
votes
2answers
62 views
what's L3$ role part in MESI protocal
I like to know more details of MESI in intel broadwell .
Suppose A cpu socket has 6 cores core 0 to core 5 ,
each of them has their own L1$ and L2$ and share L3$ ,
there are a var X in shared ...
1
vote
0answers
82 views
What is the role of Source Index Register in the below code?
I was going through some assembly code involving general purpose registers in 8086 microprocessor, I found the below code.
mov SI,2000h
mov [2000h],230d
mov [2002h],25d
mov ax,[2000h]
mov bx,[...
5
votes
2answers
130 views
Are there any modern/ancient CPUs / microcontrollers where a cached byte store is actually slower than a word store?
It's a common claim that a byte store into cache may result in an internal read-modify-write cycle, or otherwise hurt throughput or latency vs. storing a full register.
But I've never seen any ...
1
vote
1answer
60 views
About data hazard and forwarding with beq in MIPS?
Why the first add needs forwarding?
# stage:
add $1, $2, $3 # WB
add $4, $5, $6 # MEM
nop # EX
beq $1, $4, target # ID
Since beq needs the $1, if the ...
0
votes
1answer
31 views
Calculating sizes of page table parameters
I am given a system with 64-bit virtual address space. with page size of 2KB.
Also it is given that the physical memory is of the size 16GB.
I need to calculate the following parameters:
number of ...
2
votes
2answers
86 views
How to force cpu core to flush store buffer in c?
I have an application which has 2 threads , thread A affinity to core 1 and thread B affinity to core 2 ,
core 1 and core 2 are in the same x86 socket .
thread A do a busy spin of integer x , thread ...
1
vote
0answers
33 views
Do software prefetching hints disable hardware prefetcher?
The motivation of this quesion is to understand how software memory prefetching affects my program.
I'm building a multi-threaded data partitioner. Each thread sequencially read over a local source ...
2
votes
1answer
85 views
How many Supported architectures should I choose while creating apk file
I have android app, size of my android apk file is 25MB. So while creating apk file I want to know how many Supported Architectures is must, in order to reduce apk size.
Targeting 4.1 to 8.1 Android ...
1
vote
1answer
112 views
RISCV 32-bit base and 64-bit extensions
I'd like to build a RISCV simulator in C language which would support a limited instruction set of the RISC-V ISA, restricted to the 32-bit base with 64- bit extensions (RV32I and RV64I). But I'm not ...
3
votes
1answer
30 views
When making read request to DRAM, why we need to read tag and data, not data only?
I am going through David Patterson and John Hennessy's computer architecture book. In chapter2, it mentions that we may need to make two separates request to read tag and data in two cycles if we ...
0
votes
1answer
46 views
Why pipelining cannot operate at its maximum theoretical speed?
First of all, what is the maximum theoretical speed/speed up?
Can anyone explain why pipelining cannot operate at its maximum theoretical speed?
0
votes
0answers
27 views
Set associative cache with 48 bit adress
This question is from an exame my school made a year ago.
I have a N-way set associative cache with 48 bit adresses and the tag 33 bits.
The cache can store 16384 double-type elements, if the adress ...
0
votes
1answer
30 views
Check for multiarch on linux/chrome OS?
I'm making a hotfix for AROC on the Chromebook Plux V2 (which has a x86_64 architecture, but no multiarch support) and I want to run a test in his script that checks for it. What command can I use to ...
2
votes
2answers
106 views
If CPU is a binary machine, why is it slow on bit manipulations?
I found that contrary to its binary / bi-state nature, x86 CPUs are very slow when processing binary manipulations instructions such as SHR, BT, BTR, ROL and something similar.
For example, I've ...
1
vote
2answers
62 views
Processor behavior when jumping between Rings
I can't find any specific info about what really hapens to a standard CPU (ie.: x86) when some Kernel code (Ring 0) makes a 'call' to a User code (Ring 3) routine.
1) When executing that routine the ...
1
vote
1answer
54 views
What's the process of disabling interrupt in multi-processor system?
I have a textbook statement says disabling interrupt is not recommended in multi-processor system, and it will take too much time. But I don't understand this, can anyone show me the process of multi-...
-2
votes
1answer
77 views
How do things work in the fetch phase of the instruction cycle?
There's something that confuses me, in Computer System Architecture(Morris Mano), Chapter 5, the book uses a simple microprocessor which has the following instruction cycle:
e.g. LDA Operation:
AR&...
0
votes
1answer
53 views
What's 'new' in a 'new' processor when viewed from programmer's point
I have recently been interested in understanding low level computing. I understand that today's widely used computers follow x86/x86-64 architecture.
To my understanding, architecture, more ...
0
votes
2answers
64 views
will cpu reorder STORE instructions to same address?
Given below code, will CPU reorder STORE a and STORE b ? From code logic, a and b are independent.
int* __attribute__ ((noinline)) GetMemAddr(int index) {
static int data[10];
return &...
0
votes
1answer
38 views
What is overhead percentage?
Consider a 2KB direct mapped cache with blocks of size 1 word. As
always, addresses are 32 bits.
How many blocks does the cache contain? 2^7
How many bits long is each tag? (Tags are ...
1
vote
0answers
32 views
Application only seeing half the threads available on dual-processor machine
We recently acquired a dual-processor Dell workstation, equipped with two Xeon 6138 Gold CPUs. Each CPU has 20 physical cores (40 logical cores), so there is a total of 40 physical cores or 80 logical ...
0
votes
0answers
12 views
Convert some kind of integer to floating point number [duplicate]
I'm a newbie to Computer Architecture and I'm learning floating point number.
So I have learnt about converting a number fraction in decimal to binary like 1.375 . But I don't know hot to represent ...
0
votes
1answer
55 views
How does the direct mapped cache return data?
I am taking the first class in computer architecture and assembly with the Computer Organization & Design by Patterson & Hennessey textbook. I am currently learning about caches. I understand ...
-2
votes
1answer
60 views
When will dynamic branch prediction be useful? [duplicate]
For static branch prediction one always assume that the branch is not taken, while for dynamic branch prediction if the branch is taken before then it is more likely to be taken again. But I cannot ...
0
votes
1answer
63 views
What's the difference between conflict and compulsory cache miss?
I am trying to understand the real difference between conflict and compulsory misses and found this example very confusing.
Consider a 2−way set associative cache with 256 blocks and uses LRU ...