Skip to content
Advertisement

Tag: cpu

Who schedules threads?

I have a question about scheduling threads. on the one hand, I learned that threads are scheduled and treated as processes in Linux, meaning they get scheduled like any other process using the conventional methods. (for example, the Completely Fair Scheduler in linux) On the other hand, I also know that the CPU might also switch between threads using methods

Linux: How to put a load on system memory?

I’m working on a small function, that gives my users a picture of how occupied the CPU is. I’m using cat /proc/loadavg, which returns the well known 3 numbers. My problem is that the CPU doesn’t do anything, right now, while I’m developing. Is there a good way to generate some load on the CPU, I was thinking something like

Advertisement