Questions tagged [cpu]

A central processing unit executes the instructions in a computer program. Use this tag for questions about programming with/for CPUs or their processor cores.

Filter by
Sorted by
Tagged with
-3 votes
0 answers
29 views

Meltdown and spectre in 2023 [closed]

In 2018, exploit Meltdown captured all processors, namely intel, but the patches solved the problems with this vulnerability. what about spectre in 2023? At that time it was not possible to get rid of ...
Pushkin's user avatar
1 vote
0 answers
17 views

High CPU Utilization on EC2 of a Spring MVC micro service with authentication disabled

One of the services is giving high CPU utilization. I analysed the thread dump and found the following stacktrace to be the culprit of the problem. But I am not able to identify how to fix it. This is ...
Karthik sharma's user avatar
0 votes
0 answers
22 views

How Do Base and Turbo Frequencies Affect Core Utilization in Multi-Core CPUs? [closed]

I'm trying to understand the relationship between base and turbo frequencies in multi-core CPUs, specifically regarding core utilization. My CPU has a base frequency of 2.1 GHz and a turbo frequency ...
sako's user avatar
  • 29
0 votes
0 answers
26 views

ARM Assembly: Echoing characters from Read FIFO to Write FIFO in ARMv7 CPUlator. JTAG UART interface

I am having trouble echoing characters that are not in parentheses from Read FIFO to Write FIFO. These characters are typed in the JTAG UART interface. The characters from Read FIFO are being read but ...
Jared Le's user avatar
0 votes
0 answers
21 views

Which data to respond in transient state SM(AD) MSI Split Transaction Coherent Cache?

I am trying to implement a non-blocking cache which using Optimized MSI Snooping with Split-Transaction Bus - Cache Controller. My reference book is A Primer on Memory Consistency and Cache Coherence (...
Erkmen's user avatar
  • 1
-1 votes
1 answer
21 views

Why is the frequency of the CPU lower than the Max. Boost Clock?

I am using AMD's EPYC 7713 CPU. According to the specification, its maximum frequency is 3.675GHz. But when I run stress-ng (only running single threaded cpu loads), its frequency does not exceed 3....
Frontier_Setter's user avatar
0 votes
0 answers
18 views

Low FPS for Object detection on CPU

I am working on Person detection task on CPU, i have to do this task on CPU only. I have trained YOLO v8 but it is slow on cpu, please suggest me, how to boost up FPS, so, it can run perfectly, or you ...
shivanchal asthana's user avatar
0 votes
0 answers
7 views

How do I set up CloudLab for a Simple Experiment?

I am trying to test compression/decompression algorithms on GPU and CPU machines. I am very new to CloudLab and I have almost 0 idea of how to set it up and use it. I was hoping to get some help on ...
ojassethi's user avatar
  • 379
0 votes
0 answers
23 views

Nios 2 subroutine keeps running after return

I am writing Nios 2 code on an emulator, It takes the state of a button, if it is high, then looks at a couple of switches and get the number from the switch it is assigned to then puts that number ...
Jocelyn A's user avatar
-1 votes
0 answers
54 views

I have written python multiprocessor code that is only using one processor for some reason, please advise

I am trying to use a multiprocessor solution to crack md5 by brute force, but when I execute it always just uses one processor. What am I doing wrong? Would appreciate feedback, thanks. import hashlib ...
valod valodikov's user avatar
-2 votes
0 answers
13 views

Undersubscribed ESXI host shows 100% CPU [closed]

I guess the question is more theoretical one. We have ESXI host with 48 Logical Cores (HT enabled, 24 real cores). We run 4 machines each provisioned with 8 vCpu. Each machine operates on 75% CPU on ...
Boris's user avatar
  • 1,309
2 votes
1 answer
23 views

Running a job on CPU by default, but on GPU when available in Slurm

Is there a way to submit a job to Slurm with sbatch and use the gpu if available, but run on cpu if there is no gpu available? Setting: #SBATCH --gres=gpu:1 only runs on nodes where a gpu is available....
Curantil's user avatar
-1 votes
0 answers
38 views

Why does my Flutter App make the CPU go crazy?

I'm building a Flutter app on Mac (with Mac chip) and somehow, when I try to launch it (on iPhone 15 Simulator), my CPU uses the maximum percentage it can get. Surfing on the internet, I've only seen ...
Francesco Zanoncelli's user avatar
0 votes
0 answers
18 views

Input tensor is not an XLA tensor: CPUFloatType

RuntimeError: torch_xla/csrc/aten_xla_bridge.cpp:73 : Check failed: xtensor *** Begin stack trace *** tsl::CurrentStackTrace() torch_xla::bridge::GetXlaTensor(at::Tensor const&) ...
defacto_deepak's user avatar
1 vote
1 answer
32 views

How does the CPU/Kernel allow user-space code to run when it's overwhelmed by Hardware Interrupts?

I have learned that when a Hardware Interrupt occurs, the CPU saves its registers to memory and immediately runs the corresponding code from an Interrupt Vector Table. Given that these HIs occur for ...
Eric B's user avatar
  • 171
-1 votes
0 answers
25 views

whats it means,how can i transform negative complement

if machine length is five my first question , 10000(complement),1 for sign , whats its real value? 0 or -16? my second question, how can 10000(complement) transform into its opposite number(complement)...
xwj's user avatar
  • 1
-1 votes
1 answer
32 views

Linux pinning multiple user space threads to a core in isolated cpu list

I am doing an experiment on Ubuntu 7.9. My C++ app pins one thread onto a core (say 18, which is from isolated cpu list, picked from /sys/devices/system/cpu/isolated) using pthread_setaffinity_np. ...
GoodToLearn's user avatar
0 votes
1 answer
87 views

How CPU switches the execution from one thread to another to access a lock resource in Java?

I'm learning about multi-threading in Java and I have a short question. I have a synchronized block or method and 2 (or more) threads. And I have only one CPU with only one core, so the 2 threads will ...
elvis's user avatar
  • 840
0 votes
0 answers
17 views

Docker cannot delete device mapper

Good morning, I have crons which launches containers to run python scripts. When these containers are launched. We have the CPU load which is skyrocketing. This means that containers cannot delete the ...
ZahirBachnou's user avatar
1 vote
0 answers
37 views

How to correctly calculate partitions for apoc.cypher.mapParallel2 based on CPU characteristics

Let's say I have a CPU with 24 cores/48 threads. I would like to correctly specify the partitions parameter to apoc.cypher.mapParallel2 procedure https://neo4j.com/labs/apoc/5/overview/apoc.cypher/...
alexanoid's user avatar
  • 24.5k
-1 votes
0 answers
20 views

I need a wide range of experiments with Intel/AMD CPU microcode for different machine types. Does any real hardware cluster exist for such a purpose?

I would like to check how some versions of Linux kernel work on different platform using some Intel or AMD CPU. Some kernel patches need the certain microcode to be loaded into the CPU. I think QEMU ...
Pavel Kopylov's user avatar
-1 votes
0 answers
15 views

Calculating CPI with Cache miss in a 2 level D-Cache

I have this question as my assignment. Can you help me solve it ? I don't know but i think the right formula is: t_avg = hit time1 + miss rate1 * (hit time2 + miss rate2 * miss penalty2) Consider the ...
TheProphet's user avatar
0 votes
0 answers
90 views

Workarounds for incorrect CPU thread and process times on Windows 11

Apparently there are many complaints about incorrect CPU usage under Windows 11, see for example here https://answers.microsoft.com/en-us/windows/forum/all/windows-11-22h2-all-monitoring-softwares-...
TroubleWithTribbles's user avatar
0 votes
0 answers
29 views

setting CPU Limit for linux user not worked?

basically i want to limit my users for cpu usage. i have user with 1002 id and created a user-1002 slice file i have created mkdir /sys/fs/cgroup/user.slice/user-1002.slice then ranned below commands ...
Prashant Mohite's user avatar
1 vote
1 answer
59 views

Microcode emulator in Python

I am trying to deal with my computer architecture lab. The task is to create a model of processor in Python. One of the aspects is using microcode to execute machine instruction. As I understand, i ...
Егор Верещагин's user avatar
0 votes
0 answers
30 views

Nuxt 3 SSR high CPU and latency with low requests per second

I have problems with high server cpu and low number of requests in my app. In production, with 200 concurrent users, latency is almost 2 seconds. I have tried clean nuxt 3 app with one plugin and ...
Mile's user avatar
  • 1
0 votes
0 answers
36 views

Encoding a integer in python for a custom architecture

I am writing an assembler for a custom architecture in Python, and am getting stuck on the encoding step. I need to set bits 0-16, 16-32, and 32-64 to their own integer values, however, have ...
bsdsylvia's user avatar
1 vote
0 answers
37 views

Running .s file with yasm

I want start learning Assembly. But, there is a problem. I can't run my file. I tried to use yasm file.s -o run and after ./run, but I see this: bash: ./run: Permission denied After, I searched and ...
Nico's user avatar
  • 11
1 vote
1 answer
56 views

Can modern CPUs run in SIMT mode like a GPU?

GPUs use the SIMT (single-instruction, multiple-thread) paradigm where several threads execute the same instructions in perfect unison but applied on different data. This ought to have some advantages ...
VoidStar's user avatar
  • 964
1 vote
0 answers
64 views

how to reduce high Cpu Usage in emgu.cv RTSP Player?

im novice developer using c#. I made User Control for playing rtsp from emgu.cv. I used this user control for my main program for playing 9 rtsp. but when i used my user control 9 times, it makes my ...
DK kim's user avatar
  • 11
0 votes
0 answers
77 views

How can I get the number of Apple Silicon performance cores in Python?

I want to determine the number of performance cores in a Python script (it's actually going to be a Python app frozen with PyInstaller, if that makes a difference). There are some ways to get the ...
gernophil's user avatar
  • 168
0 votes
0 answers
17 views

rdtsc delta to nanosecond conversion [duplicate]

Recently, I have been trying to run some performance anlaysis on my program. I want to measure the latency of some functions in cpu ticks and later convert the delta to nanosecond. (I intentionally am ...
Hedgehog's user avatar
0 votes
2 answers
127 views

Pytorch CPU OOM kills ssh server on linux

I've run into a problem that pytorch (tested with 2.0.1+cu117) does not fail gracefully when CPU OOM occurs. Specifically, I lose all ssh connections and Xserver access to the VM or bare metal machine....
Daniel Redder's user avatar
0 votes
0 answers
47 views

Preventing direct encoding from taking up the full encoding space for custom cpu architecture

I am currently creating a CPU architecture as a hobby, and am writing an assembler in Python. I've chosen to directly encode the instruction, registers, and immediate values because it's easier at the ...
bsdsylvia's user avatar
0 votes
0 answers
53 views

Blender: Render Very High CPU usage

I'm new to Blender. My question is: I'm pretty sure that over 1000% CPU usage is not normal when I render, but could it be dangerous for my computer? This is a screenshoot: I know that a good GPU ...
Giovanni Soulk Benedetti's user avatar
0 votes
0 answers
18 views

Is a Feedback Loop from Program Counter output to input problematic?

Im designing a very simple CPU to be built on a custom PCB. I designed the CPU in LogicCircuit, and it seems to work. But I'm wondering it a specific part of the CPU will also work in real life. I ...
RenX's user avatar
  • 101
0 votes
0 answers
18 views

Why reducing num_workers and increasing batch size makes the CNN training faster with better ACC values?

I have a i5-7500, quad core CPU and a 2GB GPU. The higher the number of workers (0, to 4) the slower the training speed and the ACC values are also lowering. I noticed a difference in time in each ...
Gustavo Fortunato's user avatar
0 votes
0 answers
15 views

CPU scheduler:How’s the utilization accumulated for the jobs inside thread pool?

On the linux platform, CPU scheduler(EAS) track all the threads to decide its task utilization and CPU frequency. Assuming we have a SW thread pool module, it creates fixed amount threads and re-uses ...
hxuanji's user avatar
  • 128
1 vote
1 answer
82 views

How to measure the load generated by a web application on the user environment?

I have an old legacy service for benchmarking a load produced by html5-pages to the users hardware. Here is a high-level idea: we want to be sure that some specific web-page will not freeze users ...
Paul's user avatar
  • 6,429
0 votes
1 answer
140 views

cpu.stat metrics in a pod are zeroed when CPU limits are removed

I know that the topic for CPU limits and cfs quota has received a lot of attention since 2017 and in a multiple threads on kubernetes, a kernal fix was issued and much more. I’m hoping to find some ...
Danny Teller's user avatar
1 vote
0 answers
157 views

process queues in infinite loop

we have an online php game that requires handling tasks every second , we are doing that currently by running a cron job every minute to some script of ours via command curl -s in order to process ...
morgi tmr dasdas's user avatar
-1 votes
1 answer
116 views

How does the OS know what virtual page a specific memory address references?

I am trying to understand how variables allocated in programs (such as with the new keyword in C++) translate to virtual pages. My understanding is that each process will have its own virtual memory ...
Joshua Goncalves's user avatar
0 votes
0 answers
34 views

How does multi-core CPU work and how does the multiple cores commuicate?

As i write my virtual machine, i have come up across many problems but this has been the most annoying one. When i think about implementing multiple virtual cores, i have encountered following ...
Suraj Bista's user avatar
0 votes
0 answers
53 views

How to test how does a RISC-V implementation process misaligned data access?

I see some words on riscv-spec-20191213: Loads and stores where the effective address is not naturally aligned to the referenced datatype (i.e., on a four-byte boundary for 32-bit accesses, and a two-...
Teng Wu's user avatar
  • 77
0 votes
0 answers
17 views

MLPerf Benchmark : Can MLPerf benchmark a system without GPU / a system setup with only CPU?

MLPerf is well known to benchmark a GPU system for ML capability. As VMs with GPU are expensive and someone wants to run any ML task on a CPU-only system. Is it possible to benchmark a CPU-only system ...
Tarkik's user avatar
  • 178
1 vote
0 answers
69 views

get cpu temperature without elevated privileges

In windows 7 or in windows 11 i want to display the cpu temperature using a python script. The code i run successfully is: import wmi import pyuac def main(): w = wmi.WMI(namespace='root\\wmi') ...
Chris P's user avatar
  • 2,154
1 vote
1 answer
74 views

What's the difference between dispatching and issuing in CPU pipeline

In Software Optimization Guide for the AMD Zen4 Microarchitecture, the terminology are explained as follows: Dispatching: Dispatching refers to the act of transferring macro ops from the front end of ...
Frontier_Setter's user avatar
-1 votes
1 answer
82 views

Trying to avoid that my PC needs to shutdown while running CPU demanding programs. What I'm doing wrong?

My computer has an automatic protection system that prevents it from overheating, so when it reaches a certain temperature it protects itself by shutting down. I like this because I made a significant ...
iResolve ExOs's user avatar
0 votes
1 answer
113 views

How to see Openshift total available resources

I would like to see total available resources for namespace on openshift. I can see (and calculate) requested and limits for my pods, but how to see how much in total is available for specific ...
Pistol's user avatar
  • 1
-1 votes
2 answers
152 views

Is my code, parallelized with OpenMP, so slow because of concurrent memory access?

I have some code in which the contents of one (typically big) array is added to that of another array of the same size: for (long i = 0; i < len; i++) data1[i] += data2[i]; It looks like this ...
doetoe's user avatar
  • 771

1
2 3 4 5
95