Assignment for OOP teaches a bad practice?

Because this off topic, allow me to drop a few comments: There’s nothing wrong with the idea make each object having its own thread. Actually, this is a (obviously not so well know) programming paradigm invented by the programming language Actor in the late seventies.

Nowadays, Erlang is the most prominent language supporting 10.000 or 100.000 thread without problems. Another language I already mentioned here is Io. The website has a benchmark that shows that a webserver written in Io scales better than Apache httpd.

So, I think, there’s nothing wrong with the assignment. It’s only a problem of Java, that is nowadays always uses native threads which are a terse resource and which aren’t that fast if you have thousands of context switches per second.

Stefan

Not to mention Window’s processes are threads.
By creating threads in Windows is equivalent of forking in Linux.

Simulation of a galaxy with 1000+ opponents with 3 mill + stars around each star is 4 - 24 planets, on each plenet could be armies of opponents, each army containing somewhat mill soldiers with detailed info about itself, each trying to kick the others’ butt.

If these are independent operations that should finish in hopefully random order, then there is no starving aside some context switching penalty that would be here anyway.

There is a lot of simultaneous independed things so multiple threads are complete neccessity. Also majority of my previous research was tailored to multiple CPU computers, they appeared 5 years later than they should, so it wasn’t much difficulty to let asynchronously cooperate that up to 1400 threads on windoze. Of course on normal computer there would be aproximately 140 threads running, the higher limit would be for computers with 64 GB RAM and at least some ability to address them. Luckily 64 bit computers are also becaming the norm.

It should work well with CPUs with 3 cores, and hopefully they’d add some processing subnodes, when 3 cores would be also too little. (It seems like they could setle on multiple nodes with 3 subnodes because communication between 3 cores is triangle, between 4 cores it would be tetrahedron. Of course if they would abandon purely 2D CPU concept they might go with 4 cores without problem… aside of the cooling one.) ~_^

Right, so you have a lot of data…

That certainly does NOT rule out thread starvation…

No. ONLY if these things literally must be simultaneous - i.e. they must run on different processors - which seems very very unlikely.

OK, so you have a big computer, but you’re still wasting lots of performance unnecessarily, AFAICS.

The rest of the discussion aside (you seem to have put a lot of effort into it, so I won’t say you’re wrong. :)), that seems like a very cool project. =D
Supermassive. =D