Thread is nothing but a process.
A multi Threaded program contains different threads which can run concurrently.Even if one thread is blocked during execution the others still run.
A thread in Java begins as an instance of java.lang.Thread.
-thread scheduling is different in different systems.Different
JVMs can run threads in profoundly different ways.For example, one JVM
might be sure that all threads get their turn, with a fairly even amount of time
allocated for each thread in a nice, happy, round-robin fashion. But in other
JVMs, a thread might start running and then just hog the whole show, never
stepping out so others can have a turn. If you test your application on the
"nice turn-taking" JVM, and you don't know what is and is not guaranteed in
Java, then you might be in for a big shock when you run it under a JVM with a
different thread scheduling mechanism.
No comments:
Post a Comment