Are threads guaranteed to be timesliced?
Posted on 2006-06-07
Im studying for my certification exam and have come across the following review question in my book (ive not given the full question, just the main point).
- Consider 3 threads of the same type, all started in the same main() method. The answer to this specific question is (quoted):
"When the application is run, all 3 threads will execute concurrently, taking time-sliced turns on the CPU."
I got this question wrong as I had read somewhere that not all JVMs implement timeslicing, and not all systems support it either. So, in this case, time-slicing cannot be guaranteed and so I was lead to pick another answer (which said, "none of these cases is guaranteed".).
So the question is - Are threads guaranteed to be time sliced?
Not that I dont trust you, but if tyou could provide proof (a link etc) that would be great.