jeudi 8 janvier 2015

Writing code that implicitly won't run without N number of CPU cores


Is it possible to write a code (or a complete software, rather than a piece of code), that won't work properly when run on a CPU that has less than N number of cores? Without checking it explicitly and failing on purpose:


IF (noOfCores < 4) THEN don't run properly on purpose


I'm looking at a game (Dragon Age Inquisition) 's minimum sys requirements and it states a minimum 4 core CPU. Many players say it does NOT run on 2 core CPU's and EVEN on i3's with 2 physical + 2 logical cores. And it's NOT a problem of computing power.


From my understanding threads are completely isolated from CPU by OS since that cannot be done.


EDIT: Just to clear things out:


I am NOT asking "Can I find out no of cores from code, and fail on purpose?" ... Such a code will be ill-intended (forces you to buy a more expensive CPU to run a program - without the need of computational power). I am asking that your code, say have 4 threads and fail when 2 threads are run on same physical core (without explicitly checking system info and purposely failing).


In short, can there be software that requires multiple cores, without needing additional computing power that comes from multiple cores? It would just require N separate physical cores.





Aucun commentaire:

Enregistrer un commentaire