Hacker News new | ask | show | jobs
by bluGill 138 days ago
They can, but nobody runs a single process on such CPUs. They run some form of OS which implements spinlock, mutexes, and all these other complex things.

I suppose someplace someone is running an embedded system without an OS on such a processor - but I'd expect they are still using extra cores and so have all of the above tricks someplace.

1 comments

I never get the single threaded assertions regarding CPU performance, it is mostly useless in the day of premptive scheduling in modern OSes.

Yes it matters on MS-DOS like OS design, like some embedded deployments and that is about it.

It is even impossible to guarantee a process doesn't get rescheduled into another CPU with the performance impact it entails, unless the process explicitly sets its CPU affinity.

If you don't allow complev things like spinlocks then all that is left is single thread performance.
Except that ignores the amount of times the OS preempts the thread, or moves it into another CPU trashing all the cache contents in the process, and related NUMA patterns.

The way it is measured, is mostly ideal, assuming that threads run to completion without any of those side effects taking place.